LLVM  14.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::RTTIRoot Class Referenceabstract

Base class for the extensible RTTI hierarchy. More...

#include "llvm/Support/ExtensibleRTTI.h"

Public Member Functions

virtual ~RTTIRoot ()=default
 
virtual const void * dynamicClassID () const =0
 Returns the class ID for the dynamic type of this RTTIRoot instance. More...
 
virtual bool isA (const void *const ClassID) const
 Returns true if this class's ID matches the given class ID. More...
 
template<typename QueryT >
bool isA () const
 Check whether this instance is a subclass of QueryT. More...
 

Static Public Member Functions

static const void * classID ()
 Returns the class ID for this type. More...
 

Detailed Description

Base class for the extensible RTTI hierarchy.

This class defines virtual methods, dynamicClassID and isA, that enable type comparisons.

Definition at line 71 of file ExtensibleRTTI.h.

Constructor & Destructor Documentation

◆ ~RTTIRoot()

virtual llvm::RTTIRoot::~RTTIRoot ( )
virtualdefault

Member Function Documentation

◆ classID()

static const void* llvm::RTTIRoot::classID ( )
inlinestatic

Returns the class ID for this type.

Definition at line 76 of file ExtensibleRTTI.h.

Referenced by isA().

◆ dynamicClassID()

virtual const void* llvm::RTTIRoot::dynamicClassID ( ) const
pure virtual

Returns the class ID for the dynamic type of this RTTIRoot instance.

◆ isA() [1/2]

template<typename QueryT >
bool llvm::RTTIRoot::isA ( ) const
inline

Check whether this instance is a subclass of QueryT.

Definition at line 88 of file ExtensibleRTTI.h.

References isA().

Referenced by isA().

◆ isA() [2/2]

virtual bool llvm::RTTIRoot::isA ( const void *const  ClassID) const
inlinevirtual

Returns true if this class's ID matches the given class ID.

Definition at line 82 of file ExtensibleRTTI.h.

References classID().


The documentation for this class was generated from the following files: