diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index 0e350d24dbf..95fd7d6538d 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -31,8 +31,10 @@ ReduceMiscompilingPasses::doTest(std::vector &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 &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 &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); }