[cfe-commits] r110849 - /cfe/trunk/lib/CodeGen/CGRTTI.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Aug 11 13:41:51 PDT 2010
Author: efriedma
Date: Wed Aug 11 15:41:51 2010
New Revision: 110849
URL: http://llvm.org/viewvc/llvm-project?rev=110849&view=rev
Log:
Work in progress for PR7864. Someone more familiar with ObjC++ needs to fill
in the code after the "FIXME: Needs to be written".
Modified:
cfe/trunk/lib/CodeGen/CGRTTI.cpp
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=110849&r1=110848&r2=110849&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Wed Aug 11 15:41:51 2010
@@ -390,21 +390,35 @@
}
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 @@
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";
More information about the cfe-commits
mailing list