diff options
author | Sean Callanan <scallanan@apple.com> | 2011-04-14 02:01:31 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2011-04-14 02:01:31 +0000 |
commit | 1b1bf6e982fc5926960c69e262b1af8898d20812 (patch) | |
tree | 53d00a14d2aebb50ee502c5a13c12161a15082c9 /lldb/source/Expression/ClangExpressionParser.cpp | |
parent | 9eb0b7d2f1866584f1304cd4f777d5ef49174f9c (diff) | |
download | bcm5719-llvm-1b1bf6e982fc5926960c69e262b1af8898d20812.tar.gz bcm5719-llvm-1b1bf6e982fc5926960c69e262b1af8898d20812.zip |
Updated LLVM to pick up fixes to the ARM instruction
tables.
llvm-svn: 129500
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 59849351e19..0d693ce0aeb 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -244,10 +244,28 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope, // and other things that _are_ target specific really shouldn't just be // using the host triple. This needs to be fixed in a better way. if (target && target->GetArchitecture().IsValid()) - m_compiler->getTargetOpts().Triple = target->GetArchitecture().GetTriple().str(); + { + std::string triple = target->GetArchitecture().GetTriple().str(); + + int dash_count = 0; + for (int i = 0; i < triple.size(); ++i) + { + if (triple[i] == '-') + dash_count++; + if (dash_count == 3) + { + triple.resize(i); + break; + } + } + + m_compiler->getTargetOpts().Triple = triple; + } else + { m_compiler->getTargetOpts().Triple = llvm::sys::getHostTriple(); - + } + // 3. Set up various important bits of infrastructure. m_compiler->createDiagnostics(0, 0); |