summaryrefslogtreecommitdiff
path: root/tools/bugpoint/bugpoint.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-04-12 05:08:25 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-04-12 05:08:25 +0000
commit22ff748712b348300e51248339b6e8cf9b59e2c6 (patch)
treeab07a4e3d46ed34d8f3510ed11ea772016bca4bd /tools/bugpoint/bugpoint.cpp
parent67a71b5306c42f1d56a0d58635432b86206c2a9a (diff)
downloadllvm-22ff748712b348300e51248339b6e8cf9b59e2c6.tar.gz
llvm-22ff748712b348300e51248339b6e8cf9b59e2c6.tar.bz2
llvm-22ff748712b348300e51248339b6e8cf9b59e2c6.tar.xz
Remove use of exceptions from bugpoint. No deliberate functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/bugpoint.cpp')
-rw-r--r--tools/bugpoint/bugpoint.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index e14f31e67d..ba5234bdc8 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/tools/bugpoint/bugpoint.cpp
@@ -149,23 +149,11 @@ int main(int argc, char **argv) {
// avoid filling up the disk, we prevent it
sys::Process::PreventCoreFiles();
- try {
- return D.run();
- } catch (ToolExecutionError &TEE) {
- errs() << "Tool execution error: " << TEE.what() << '\n';
- } catch (const std::string& msg) {
- errs() << argv[0] << ": " << msg << "\n";
- } catch (const std::bad_alloc&) {
- errs() << "Oh no, a bugpoint process ran out of memory!\n"
- "To increase the allocation limits for bugpoint child\n"
- "processes, use the -mlimit option.\n";
- } catch (const std::exception &e) {
- errs() << "Whoops, a std::exception leaked out of bugpoint: "
- << e.what() << "\n"
- << "This is a bug in bugpoint!\n";
- } catch (...) {
- errs() << "Whoops, an exception leaked out of bugpoint. "
- << "This is a bug in bugpoint!\n";
+ std::string Error;
+ bool Failure = D.run(Error);
+ if (!Error.empty()) {
+ errs() << Error;
+ return 1;
}
- return 1;
+ return Failure;
}