summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r--llvm/tools/lli/lli.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 6b6d0b7395a..7923e8fe42d 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud