[llvm-commits] [llvm] r103721 - /llvm/trunk/tools/bugpoint/ToolRunner.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Thu May 13 10:58:15 PDT 2010


Author: stoklund
Date: Thu May 13 12:58:15 2010
New Revision: 103721

URL: http://llvm.org/viewvc/llvm-project?rev=103721&view=rev
Log:
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.

Modified:
    llvm/trunk/tools/bugpoint/ToolRunner.cpp

Modified: llvm/trunk/tools/bugpoint/ToolRunner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ToolRunner.cpp?rev=103721&r1=103720&r2=103721&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/ToolRunner.cpp (original)
+++ llvm/trunk/tools/bugpoint/ToolRunner.cpp Thu May 13 12:58:15 2010
@@ -620,10 +620,9 @@
 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;
     }
   }





More information about the llvm-commits mailing list