LLVM: llvm::RTTIExtends< ThisT, ParentT, ParentTs (original) (raw)

template<typename ThisT, typename ParentT, typename... ParentTs>
class llvm::RTTIExtends< ThisT, ParentT, ParentTs >

Inheritance utility for extensible RTTI.

Multiple inheritance is supported, but RTTIExtends only inherits constructors from the first base class. All subsequent bases will be default constructed. Virtual and non-public inheritance are not supported.

RTTIExtents uses CRTP so the first template argument to RTTIExtends is the newly introduced type, and the second and later arguments are the parent classes.

class MyType : public RTTIExtends<MyType, RTTIRoot> {

public:

static char ID;

};

class MyDerivedType : public RTTIExtends<MyDerivedType, MyType> {

public:

static char ID;

};

class MyOtherType : public RTTIExtends<MyOtherType, MyType> {

public:

static char ID;

};

class MyMultipleInheritanceType

: public RTTIExtends<MyMultipleInheritanceType,

MyDerivedType, MyOtherType> {

public:

static char ID;

};

Inheritance utility for extensible RTTI.

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

Definition at line 128 of file ExtensibleRTTI.h.