diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-09 17:49:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-09 17:49:19 +0000 |
commit | 76c218e0944189a0c16fb38a6a3a74c6b930810e (patch) | |
tree | 955b1d9e34fdf7a66aabd2417200225ea179618e /tools/lli | |
parent | 5d84a0761edf17e5fde97f200e525e066be54b78 (diff) |
Bitcode: Change the materializer interface to return llvm::Error.
Differential Revision: https://reviews.llvm.org/D26439
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r-- | tools/lli/lli.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 6b6d0b7395a..7923e8fe42d 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -418,11 +418,9 @@ int main(int argc, char **argv, char * const *envp) { // If not jitting lazily, load the whole bitcode file eagerly too. if (NoLazyCompilation) { - if (std::error_code EC = Mod->materializeAll()) { - errs() << argv[0] << ": bitcode didn't read correctly.\n"; - errs() << "Reason: " << EC.message() << "\n"; - exit(1); - } + ExitOnError ExitOnErr(std::string(argv[0]) + + ": bitcode didn't read correctly: "); + ExitOnErr(Mod->materializeAll()); } std::string ErrorMsg; |