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
This commit is contained in:
Greg Clayton 2012-10-15 21:16:43 +00:00
parent 3bc98d94ad
commit c4c5e89152
1 changed files with 3 additions and 3 deletions

View File

@ -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<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 @@ ClangASTContext::GetLLDBBasicTypeEnumeration (clang_type_t clang_type)
case clang::BuiltinType::BuiltinFn:
case clang::BuiltinType::ARCUnbridgedCast:
return eBasicTypeOther;
}
}
}