LLVM 20.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"

Inheritance diagram for llvm::RTTIRoot:
Inheritance graph
[legend]

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Base class for the extensible RTTI hierarchy.

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

Definition at line 69 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 74 of file ExtensibleRTTI.h.

Referenced by isA().

◆ dynamicClassID()

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

◆ isA() [1/2]

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

Check whether this instance is a subclass of QueryT.

Definition at line 86 of file ExtensibleRTTI.h.

References isA().

Referenced by isA().

◆ isA() [2/2]

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

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