60#ifndef LLVM_SUPPORT_EXTENSIBLERTTI_H
61#define LLVM_SUPPORT_EXTENSIBLERTTI_H
80 virtual bool isA(
const void *
const ClassID)
const {
85 virtual void anchor();
125template <
typename ThisT,
typename ParentT,
typename... ParentTs>
129 using ParentT::ParentT;
131 static const void *
classID() {
return &ThisT::ID; }
136 template <
typename QueryT>
bool isA()
const {
return isA(QueryT::classID()); }
138 bool isA(
const void *
const ClassID)
const override {
139 return ClassID ==
classID() || ParentT::isA(ClassID) ||
140 (ParentTs::isA(ClassID) || ...);
143 template <
typename T>
static bool classof(
const T *R) {
144 return R->template isA<ThisT>();
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.
This is an optimization pass for GlobalISel generic memory operations.