#include "llvm/Support/ExtensibleRTTI.h"
#include "llvm/Support/Casting.h"
#include "gtest/gtest.h"
usingnamespacellvm;
namespace {
class MyBaseType : public RTTIExtends<MyBaseType, RTTIRoot> { … };
class MyDerivedType : public RTTIExtends<MyDerivedType, MyBaseType> { … };
class MyOtherDerivedType : public RTTIExtends<MyOtherDerivedType, MyBaseType> { … };
class MyDeeperDerivedType
: public RTTIExtends<MyDeeperDerivedType, MyDerivedType> { … };
char MyBaseType::ID = …;
char MyDerivedType::ID = …;
char MyOtherDerivedType::ID = …;
char MyDeeperDerivedType::ID = …;
TEST(ExtensibleRTTI, isa) { … }
TEST(ExtensibleRTTI, cast) { … }
TEST(ExtensibleRTTI, dyn_cast) { … }
}