X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fbugpoint%2FFindBugs.cpp;h=e2941f6f43aea81251af67d2dfe3607bba2b0032;hb=5be77762a3aa434ee877b0a03b98b5c3a7571918;hp=5c1bedebf19edef27def4b86787a85d8dcf16190;hpb=8ba15cb7099d9eadcb345328228d77ffa5afa42d;p=oota-llvm.git diff --git a/tools/bugpoint/FindBugs.cpp b/tools/bugpoint/FindBugs.cpp index 5c1bedebf19..e2941f6f43a 100644 --- a/tools/bugpoint/FindBugs.cpp +++ b/tools/bugpoint/FindBugs.cpp @@ -17,6 +17,7 @@ #include "BugDriver.h" #include "ToolRunner.h" #include "llvm/Pass.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/raw_ostream.h" #include #include @@ -29,8 +30,7 @@ using namespace llvm; /// If the passes did not compile correctly, output the command required to /// recreate the failure. This returns true if a compiler error is found. /// -bool -BugDriver::runManyPasses(const std::vector &AllPasses, +bool BugDriver::runManyPasses(const std::vector &AllPasses, std::string &ErrMsg) { setPassesToRun(AllPasses); outs() << "Starting bug finding procedure...\n\n"; @@ -59,11 +59,11 @@ BugDriver::runManyPasses(const std::vector &AllPasses, // outs() << "Running selected passes on program to test for crash: "; for(int i = 0, e = PassesToRun.size(); i != e; i++) { - outs() << "-" << PassesToRun[i]->getPassArgument() << " "; + outs() << "-" << PassesToRun[i] << " "; } std::string Filename; - if(runPasses(PassesToRun, Filename, false)) { + if(runPasses(Program, PassesToRun, Filename, false)) { outs() << "\n"; outs() << "Optimizer passes caused failure!\n\n"; debugOptimizerCrash(); @@ -90,7 +90,7 @@ BugDriver::runManyPasses(const std::vector &AllPasses, // output (created above). // outs() << "*** Checking if passes caused miscompliation:\n"; - bool Diff = diffProgram(Filename, "", false, &Error); + bool Diff = diffProgram(Program, Filename, "", false, &Error); if (Error.empty() && Diff) { outs() << "\n*** diffProgram returned true!\n"; debugMiscompilation(&Error); @@ -104,7 +104,7 @@ BugDriver::runManyPasses(const std::vector &AllPasses, } outs() << "\n*** diff'd output matches!\n"; - sys::Path(Filename).eraseFromDisk(); + sys::fs::remove(Filename); outs() << "\n\n"; num++;