aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-13 17:58:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-05-13 17:58:15 +0000
commit18e05b4692068b2cc1dfbc3aeb682ac2ec63d11b (patch)
tree8dd893adb8a7786f15b749b4ed81fec70e7ab6d4 /tools
parenteb7d8189699c1885c1624d3808637b09075da145 (diff)
downloadexternal_llvm-18e05b4692068b2cc1dfbc3aeb682ac2ec63d11b.zip
external_llvm-18e05b4692068b2cc1dfbc3aeb682ac2ec63d11b.tar.gz
external_llvm-18e05b4692068b2cc1dfbc3aeb682ac2ec63d11b.tar.bz2
Fix complete badness in bugpoint's IsARMArchitecture() function.
The revision history for this function is interesting, with multiple layers of wrongness being introduced one at a time. This fixes a weird issue where bugpoint -run-llc would suddenly exit 13 half way through isolating a miscompilation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/bugpoint/ToolRunner.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 1ff44c7..4baafd1 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -620,10 +620,9 @@ CBE *AbstractInterpreter::createCBE(const char *Argv0,
static bool IsARMArchitecture(std::vector<std::string> Args) {
for (std::vector<std::string>::const_iterator
I = Args.begin(), E = Args.end(); I != E; ++I) {
- StringRef S(*I);
- if (!S.equals_lower("-arch")) {
+ if (StringRef(*I).equals_lower("-arch")) {
++I;
- if (I != E && !S.substr(0, strlen("arm")).equals_lower("arm"))
+ if (I != E && StringRef(*I).substr(0, strlen("arm")).equals_lower("arm"))
return true;
}
}