From c4c5e89152cd415473995e8ff6f10265a610d49f Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Mon, 15 Oct 2012 21:16:43 +0000 Subject: [PATCH] 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. llvm-svn: 165979 --- lldb/source/Symbol/ClangASTContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 57e2ac1..70f4af1 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -3651,11 +3651,10 @@ ClangASTContext::GetLLDBBasicTypeEnumeration (clang_type_t clang_type) { 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(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 @@ ClangASTContext::GetLLDBBasicTypeEnumeration (clang_type_t clang_type) case clang::BuiltinType::BuiltinFn: case clang::BuiltinType::ARCUnbridgedCast: return eBasicTypeOther; + } } } -- 2.7.4