More cleanups
authorChris Lattner <sabre@nondot.org>
Fri, 17 Oct 2003 23:07:47 +0000 (23:07 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 17 Oct 2003 23:07:47 +0000 (23:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9215 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/Miscompilation.cpp

index 0e350d24dbf8fa59818073fed6b5765f340975d8..95fd7d6538d205a934378a6c2d6ba646e7708485 100644 (file)
@@ -31,8 +31,10 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
 
   std::string BytecodeResult;
   if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
-    std::cerr << BD.getToolName() << ": Error running this sequence of passes"
+    std::cerr << ": Error running this sequence of passes" 
               << " on the input program!\n";
+    BD.setPassesToRun(Suffix);
+    BD.EmitProgressBytecode("pass-error",  false);
     exit(1);
   }
 
@@ -92,7 +94,7 @@ ReduceMiscompilingPasses::doTest(std::vector<const PassInfo*> &Prefix,
   if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) {
     std::cerr << ": Error running this sequence of passes" 
               << " on the input program!\n";
-    BD.setPassesToRun(Prefix);
+    BD.setPassesToRun(Suffix);
     BD.EmitProgressBytecode("pass-error",  false);
     exit(1);
   }
@@ -205,8 +207,10 @@ bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs,
   std::string BytecodeResult;
   if (BD.runPasses(BD.PassesToRun, BytecodeResult, false/*delete*/,
                    true/*quiet*/)) {
-    std::cerr << BD.getToolName() << ": Error running this sequence of passes"
+    std::cerr << ": Error running this sequence of passes" 
               << " on the input program!\n";
+    BD.setPassesToRun(Suffix);
+    BD.EmitProgressBytecode("pass-error",  false);
     exit(1);
   }