[cfe-commits] r111085 - /cfe/trunk/lib/CodeGen/CGRTTI.cpp
Eli Friedman
eli.friedman at gmail.com
Sat Aug 14 17:24:31 PDT 2010
Author: efriedma
Date: Sat Aug 14 19:24:31 2010
New Revision: 111085
URL: http://llvm.org/viewvc/llvm-project?rev=111085&view=rev
Log:
Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo.
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=111085&r1=111084&r2=111085&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Sat Aug 14 19:24:31 2010
@@ -545,18 +545,31 @@
Fields.push_back(BuildName(Ty, DecideHidden(Ty), Linkage));
switch (Ty->getTypeClass()) {
- default: assert(false && "Unhandled type class!");
+#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");
// GCC treats vector types as fundamental types.
case Type::Builtin:
case Type::Vector:
case Type::ExtVector:
+ case Type::Complex:
+ case Type::BlockPointer:
// Itanium C++ ABI 2.9.5p4:
// abi::__fundamental_type_info adds no data members to std::type_info.
break;
-
+
+ case Type::LValueReference:
+ case Type::RValueReference:
+ assert(false && "References shouldn't get here");
+
case Type::ConstantArray:
case Type::IncompleteArray:
+ case Type::VariableArray:
// Itanium C++ ABI 2.9.5p5:
// abi::__array_type_info adds no data members to std::type_info.
break;
More information about the cfe-commits
mailing list