Fixed a compile error.

llvm-svn: 136551
This commit is contained in:
Greg Clayton 2011-07-30 01:26:02 +00:00
parent d560ed7f1b
commit 880cbb04b3
2 changed files with 10 additions and 5 deletions

View File

@ -368,7 +368,7 @@ ClangASTContext::ClangASTContext (const char *target_triple) :
{ {
if (target_triple && target_triple[0]) if (target_triple && target_triple[0])
m_target_triple.assign (target_triple); SetTargetTriple (target_triple);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -413,13 +413,18 @@ ClangASTContext::SetTargetTriple (const char *target_triple)
{ {
Clear(); Clear();
m_target_triple.assign(target_triple); m_target_triple.assign(target_triple);
if (m_target_triple.find("armv7s") == 0)
m_target_triple.erase(5,1);
else if (m_target_triple.find("armv7f") == 0)
m_target_triple.erase(5,1);
else if (m_target_triple.find("armv7k") == 0)
m_target_triple.erase(5,1);
} }
void void
ClangASTContext::SetArchitecture (const ArchSpec &arch) ClangASTContext::SetArchitecture (const ArchSpec &arch)
{ {
Clear(); SetTargetTriple(arch.GetTriple().str().c_str());
m_target_triple.assign(arch.GetTriple().str());
} }
bool bool

View File

@ -235,10 +235,10 @@ ClangASTType::GetMinimumLanguage (lldb::clang_type_t clang_type)
case clang::BuiltinType::BoundMember: case clang::BuiltinType::BoundMember:
case clang::BuiltinType::UnknownAny: case clang::BuiltinType::UnknownAny:
break; break;
case clang::Type::Typedef:
return GetMinimumLanguage(cast<clang::TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr());
} }
break; break;
case clang::Type::Typedef:
return GetMinimumLanguage(cast<clang::TypedefType>(qual_type)->getDecl()->getUnderlyingType().getAsOpaquePtr());
} }
} }
return lldb::eLanguageTypeC; return lldb::eLanguageTypeC;