[Lldb-commits] [lldb] r165979 - /lldb/trunk/source/Symbol/ClangASTContext.cpp
Greg Clayton
gclayton at apple.com
Mon Oct 15 14:16:43 PDT 2012
Author: gclayton
Date: Mon Oct 15 16:16:43 2012
New Revision: 165979
URL: http://llvm.org/viewvc/llvm-project?rev=165979&view=rev
Log:
Fixed a logic error that showed up when compiling with a newer version of clang where:
lldb::BasicType
ClangASTContext::GetLLDBBasicTypeEnumeration (clang_type_t clang_type)
would return a bogus value.
Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=165979&r1=165978&r2=165979&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Mon Oct 15 16:16:43 2012
@@ -3651,11 +3651,10 @@
{
QualType qual_type(QualType::getFromOpaquePtr(clang_type));
const clang::Type::TypeClass type_class = qual_type->getTypeClass();
- switch (type_class)
+ if (type_class == clang::Type::Builtin)
{
- case clang::Type::Builtin:
switch (cast<clang::BuiltinType>(qual_type)->getKind())
-
+ {
case clang::BuiltinType::Void: return eBasicTypeVoid;
case clang::BuiltinType::Bool: return eBasicTypeBool;
case clang::BuiltinType::Char_S: return eBasicTypeSignedChar;
@@ -3694,6 +3693,7 @@
case clang::BuiltinType::BuiltinFn:
case clang::BuiltinType::ARCUnbridgedCast:
return eBasicTypeOther;
+ }
}
}
More information about the lldb-commits
mailing list