diff options
author | Justin Bogner <mail@justinbogner.com> | 2016-09-06 04:45:37 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2016-09-06 04:45:37 +0000 |
commit | 24dac6afe29ccbd4455dc44d6d6bc85b04bfbc31 (patch) | |
tree | 704eecd1c2c20265e79bd4f4863ba1f5232d67c7 /llvm/tools/bugpoint/FindBugs.cpp | |
parent | 46b1a9a70c171c44eb2fe0948f9b6f1be2387aa3 (diff) | |
download | bcm5719-llvm-24dac6afe29ccbd4455dc44d6d6bc85b04bfbc31.tar.gz bcm5719-llvm-24dac6afe29ccbd4455dc44d6d6bc85b04bfbc31.zip |
Revert "bugpoint: Stop threading errors through APIs that never fail"
This isn't the right thing to do - it turns out a number of the APIs
that "never fail" just exit(1) if something bad happens. We can and
should thread Error through this instead.
That diff will make more sense with this reverted. Sorry for the
noise.
This reverts r280690
llvm-svn: 280691
Diffstat (limited to 'llvm/tools/bugpoint/FindBugs.cpp')
-rw-r--r-- | llvm/tools/bugpoint/FindBugs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/bugpoint/FindBugs.cpp b/llvm/tools/bugpoint/FindBugs.cpp index 818baf9e83f..3c345c5503c 100644 --- a/llvm/tools/bugpoint/FindBugs.cpp +++ b/llvm/tools/bugpoint/FindBugs.cpp @@ -30,7 +30,8 @@ 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<std::string> &AllPasses) { +bool BugDriver::runManyPasses(const std::vector<std::string> &AllPasses, + std::string &ErrMsg) { setPassesToRun(AllPasses); outs() << "Starting bug finding procedure...\n\n"; @@ -81,7 +82,7 @@ bool BugDriver::runManyPasses(const std::vector<std::string> &AllPasses) { if (!Error.empty()) { outs() << "\n*** compileProgram threw an exception: "; outs() << Error; - return debugCodeGeneratorCrash(); + return debugCodeGeneratorCrash(ErrMsg); } outs() << '\n'; @@ -99,7 +100,7 @@ bool BugDriver::runManyPasses(const std::vector<std::string> &AllPasses) { } if (!Error.empty()) { errs() << Error; - debugCodeGeneratorCrash(); + debugCodeGeneratorCrash(ErrMsg); return true; } outs() << "\n*** diff'd output matches!\n"; |