diff options
author | Anders Carlsson <andersca@mac.com> | 2010-11-04 05:28:09 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-11-04 05:28:09 +0000 |
commit | 2bd6250f8e14750033362664ee298c2cc0e64853 (patch) | |
tree | f0c18bbd85312c6a53d60d4c38d17def6b1c0e88 /lib/CodeGen/CGRTTI.cpp | |
parent | e292368afa63337f5ff64c967857a898d6f868da (diff) |
std::nullptr_t is a fundamental type for RTTI purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r-- | lib/CodeGen/CGRTTI.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index 2e527d084c..7a7195aac4 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -187,13 +187,14 @@ static bool TypeInfoIsInStandardLibrary(const BuiltinType *Ty) { // Basic type information (e.g. for "int", "bool", etc.) will be kept in // the run-time support library. Specifically, the run-time support // library should contain type_info objects for the types X, X* and - // X const*, for every X in: void, bool, wchar_t, char, unsigned char, - // signed char, short, unsigned short, int, unsigned int, long, - // unsigned long, long long, unsigned long long, float, double, long double, - // char16_t, char32_t, and the IEEE 754r decimal and half-precision - // floating point types. + // X const*, for every X in: void, std::nullptr_t, bool, wchar_t, char, + // unsigned char, signed char, short, unsigned short, int, unsigned int, + // long, unsigned long, long long, unsigned long long, float, double, + // long double, char16_t, char32_t, and the IEEE 754r decimal and + // half-precision floating point types. switch (Ty->getKind()) { case BuiltinType::Void: + case BuiltinType::NullPtr: case BuiltinType::Bool: case BuiltinType::WChar: case BuiltinType::Char_U: @@ -222,9 +223,6 @@ static bool TypeInfoIsInStandardLibrary(const BuiltinType *Ty) { case BuiltinType::UndeducedAuto: assert(false && "Should not see this type here!"); - case BuiltinType::NullPtr: - assert(false && "FIXME: nullptr_t is not handled!"); - case BuiltinType::ObjCId: case BuiltinType::ObjCClass: case BuiltinType::ObjCSel: @@ -934,16 +932,16 @@ void CodeGenModule::EmitFundamentalRTTIDescriptor(QualType Type) { } void CodeGenModule::EmitFundamentalRTTIDescriptors() { - QualType FundamentalTypes[] = { Context.VoidTy, Context.Char32Ty, - Context.Char16Ty, Context.UnsignedLongLongTy, - Context.LongLongTy, Context.WCharTy, - Context.UnsignedShortTy, Context.ShortTy, - Context.UnsignedLongTy, Context.LongTy, - Context.UnsignedIntTy, Context.IntTy, - Context.UnsignedCharTy, Context.FloatTy, - Context.LongDoubleTy, Context.DoubleTy, - Context.CharTy, Context.BoolTy, - Context.SignedCharTy }; + QualType FundamentalTypes[] = { Context.VoidTy, Context.NullPtrTy, + Context.BoolTy, Context.WCharTy, + Context.CharTy, Context.UnsignedCharTy, + Context.SignedCharTy, Context.ShortTy, + Context.UnsignedShortTy, Context.IntTy, + Context.UnsignedIntTy, Context.LongTy, + Context.UnsignedLongTy, Context.LongLongTy, + Context.UnsignedLongLongTy, Context.FloatTy, + Context.DoubleTy, Context.LongDoubleTy, + Context.Char16Ty, Context.Char32Ty }; for (unsigned i = 0; i < sizeof(FundamentalTypes)/sizeof(QualType); ++i) EmitFundamentalRTTIDescriptor(FundamentalTypes[i]); } |