diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2010-04-12 05:08:25 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2010-04-12 05:08:25 +0000 |
| commit | 6ba630b0778c41f5c6fde281b1496131419d74b4 (patch) | |
| tree | 798b918085f9bee9a38b1e697abb520e7050b25f /llvm/tools/bugpoint/bugpoint.cpp | |
| parent | 1f272f7fd851d1fbc51e9e4373fc2be960492288 (diff) | |
| download | bcm5719-llvm-6ba630b0778c41f5c6fde281b1496131419d74b4.tar.gz bcm5719-llvm-6ba630b0778c41f5c6fde281b1496131419d74b4.zip | |
Remove use of exceptions from bugpoint. No deliberate functionality change!
llvm-svn: 101013
Diffstat (limited to 'llvm/tools/bugpoint/bugpoint.cpp')
| -rw-r--r-- | llvm/tools/bugpoint/bugpoint.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp index e14f31e67d8..ba5234bdc89 100644 --- a/llvm/tools/bugpoint/bugpoint.cpp +++ b/llvm/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; } |

