diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-08-11 20:41:51 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-08-11 20:41:51 +0000 |
commit | 1cf26f5c103cd2d6d1e14d4d6b72df477d8bf107 (patch) | |
tree | 90535ffeef369a5687efec079674ddb7031570f6 /lib/CodeGen | |
parent | 4fbe7aad307dba8d668b7878cd5e833c9467d1d8 (diff) |
Work in progress for PR7864. Someone more familiar with ObjC++ needs to fill
in the code after the "FIXME: Needs to be written".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGRTTI.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index 0724fdfba3..7dce9a0f5f 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -390,21 +390,35 @@ static bool CanUseSingleInheritance(const CXXRecordDecl *RD) { } void RTTIBuilder::BuildVTablePointer(const Type *Ty) { - const char *VTableName; + const char *VTableName = 0; switch (Ty->getTypeClass()) { - default: assert(0 && "Unhandled type!"); +#define TYPE(Class, Base) +#define ABSTRACT_TYPE(Class, Base) +#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class: +#define NON_CANONICAL_TYPE(Class, Base) case Type::Class: +#define DEPENDENT_TYPE(Class, Base) case Type::Class: +#include "clang/AST/TypeNodes.def" + assert(false && "Non-canonical and dependent types shouldn't get here"); + + case Type::LValueReference: + case Type::RValueReference: + assert(false && "References shouldn't get here"); case Type::Builtin: - // GCC treats vector types as fundamental types. + // GCC treats vector and complex types as fundamental types. case Type::Vector: case Type::ExtVector: + case Type::Complex: + // FIXME: GCC treats block pointers as fundamental types?! + case Type::BlockPointer: // abi::__fundamental_type_info. VTableName = "_ZTVN10__cxxabiv123__fundamental_type_infoE"; break; case Type::ConstantArray: case Type::IncompleteArray: + case Type::VariableArray: // abi::__array_type_info. VTableName = "_ZTVN10__cxxabiv117__array_type_infoE"; break; @@ -438,6 +452,13 @@ void RTTIBuilder::BuildVTablePointer(const Type *Ty) { break; } + case Type::ObjCObject: + case Type::ObjCInterface: + case Type::ObjCObjectPointer: + assert(false && "FIXME: Needs to be written!"); + VTableName = "_ZTVN10__cxxabiv117__class_type_infoE"; + break; + case Type::Pointer: // abi::__pointer_type_info. VTableName = "_ZTVN10__cxxabiv119__pointer_type_infoE"; |