60#ifndef LLVM_SUPPORT_EXTENSIBLERTTI_H
61#define LLVM_SUPPORT_EXTENSIBLERTTI_H
76 static const void *
classID() {
return &ID; }
82 virtual bool isA(
const void *
const ClassID)
const {
87 virtual void anchor();
127template <
typename ThisT,
typename ParentT,
typename... ParentTs>
131 using ParentT::ParentT;
133 static const void *
classID() {
return &ThisT::ID; }
138 template <
typename QueryT>
bool isA()
const {
return isA(QueryT::classID()); }
140 bool isA(
const void *
const ClassID)
const override {
141 return ClassID ==
classID() || ParentT::isA(ClassID) ||
142 (ParentTs::isA(ClassID) || ...);
145 template <
typename T>
static bool classof(
const T *R) {
Inheritance utility for extensible RTTI.
bool isA(const void *const ClassID) const override
bool isA() const
Check whether this instance is a subclass of QueryT.
static const void * classID()
const void * dynamicClassID() const override
static bool classof(const T *R)
Base class for the extensible RTTI hierarchy.
static const void * classID()
Returns the class ID for this type.
virtual bool isA(const void *const ClassID) const
Returns true if this class's ID matches the given class ID.
virtual ~RTTIRoot()=default
virtual const void * dynamicClassID() const =0
Returns the class ID for the dynamic type of this RTTIRoot instance.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.