From 06943add8b2b764e131979cca064eda9f28826c9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 25 Apr 2003 03:16:05 +0000 Subject: [PATCH] Rename Kept -> Suffix Fix problem where we accidentally returned KeepPrefix instead of KeepSuffix! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5925 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/bugpoint/Miscompilation.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp index 0ed35c83895..01d46aa7c4b 100644 --- a/tools/bugpoint/Miscompilation.cpp +++ b/tools/bugpoint/Miscompilation.cpp @@ -38,14 +38,14 @@ public: ReduceMiscompilingPasses::TestResult ReduceMiscompilingPasses::doTest(std::vector &Prefix, - std::vector &Kept) { - // First, run the program with just the Kept passes. If it is still broken + std::vector &Suffix) { + // First, run the program with just the Suffix passes. If it is still broken // with JUST the kept passes, discard the prefix passes. - std::cout << "Checking to see if '" << getPassesString(Kept) + std::cout << "Checking to see if '" << getPassesString(Suffix) << "' compile correctly: "; std::string BytecodeResult; - if (BD.runPasses(Kept, BytecodeResult, false/*delete*/, true/*quiet*/)) { + if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) { std::cerr << BD.getToolName() << ": Error running this sequence of passes" << " on the input program!\n"; exit(1); @@ -60,8 +60,8 @@ ReduceMiscompilingPasses::doTest(std::vector &Prefix, if (Prefix.empty()) return NoFailure; - // First, run the program with just the Kept passes. If it is still broken - // with JUST the kept passes, discard the prefix passes. + // Next, see if the program is broken if we run the "prefix" passes first, + // then seperately run the "kept" passes. std::cout << "Checking to see if '" << getPassesString(Prefix) << "' compile correctly: "; @@ -96,13 +96,13 @@ ReduceMiscompilingPasses::doTest(std::vector &Prefix, } removeFile(BytecodeResult); // No longer need the file on disk - std::cout << "Checking to see if '" << getPassesString(Kept) + std::cout << "Checking to see if '" << getPassesString(Suffix) << "' passes compile correctly after the '" << getPassesString(Prefix) << "' passes: "; Module *OriginalInput = BD.Program; BD.Program = PrefixOutput; - if (BD.runPasses(Kept, BytecodeResult, false/*delete*/, true/*quiet*/)) { + if (BD.runPasses(Suffix, BytecodeResult, false/*delete*/, true/*quiet*/)) { std::cerr << BD.getToolName() << ": Error running this sequence of passes" << " on the input program!\n"; exit(1); @@ -112,7 +112,7 @@ ReduceMiscompilingPasses::doTest(std::vector &Prefix, if (BD.diffProgram(Output, BytecodeResult, true/*delete bytecode*/)) { std::cout << "nope.\n"; delete OriginalInput; // We pruned down the original input... - return KeepPrefix; + return KeepSuffix; } // Otherwise, we must not be running the bad pass anymore. @@ -136,8 +136,8 @@ public: ReduceMiscompilingFunctions(BugDriver &bd) : BD(bd) {} virtual TestResult doTest(std::vector &Prefix, - std::vector &Kept) { - if (TestFuncs(Kept, false)) + std::vector &Suffix) { + if (TestFuncs(Suffix, false)) return KeepSuffix; if (!Prefix.empty() && TestFuncs(Prefix, false)) return KeepPrefix; -- 2.34.1