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.

llvm-svn: 103721
This commit is contained in:
Jakob Stoklund Olesen 2010-05-13 17:58:15 +00:00
parent 23b545ca4b
commit 3e0ddc000c
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}
}