Unbreak code generator debug mode
[oota-llvm.git] / tools / bugpoint / BugDriver.cpp
index 67f59fd54d77657e98f7a6e47a2d4a094e854441..08011085577cc6781f57be1957322ae3d204b058 100644 (file)
@@ -128,9 +128,11 @@ bool BugDriver::run() {
   // a bytecode file, then we know the compiler didn't crash, so try to diagnose
   // a miscompilation.
   //
-  std::cout << "Running selected passes on program to test for crash: ";
-  if (runPasses(PassesToRun))
-    return debugCrash();
+  if (!PassesToRun.empty()) {
+    std::cout << "Running selected passes on program to test for crash: ";
+    if (runPasses(PassesToRun))
+      return debugCrash();
+  }
 
   std::cout << "Checking for a miscompilation...\n";