summaryrefslogtreecommitdiff
path: root/tools/lli/lli.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lli/lli.cpp')
-rw-r--r--tools/lli/lli.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index c6db51a2b0..8e6669221b 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -413,11 +413,10 @@ int main(int argc, char **argv, char * const *envp) {
}
// If not jitting lazily, load the whole bitcode file eagerly too.
- std::string ErrorMsg;
if (NoLazyCompilation) {
- if (Mod->MaterializeAllPermanently(&ErrorMsg)) {
+ if (error_code EC = Mod->materializeAllPermanently()) {
errs() << argv[0] << ": bitcode didn't read correctly.\n";
- errs() << "Reason: " << ErrorMsg << "\n";
+ errs() << "Reason: " << EC.message() << "\n";
exit(1);
}
}
@@ -433,6 +432,7 @@ int main(int argc, char **argv, char * const *envp) {
DebugIRPass->runOnModule(*Mod);
}
+ std::string ErrorMsg;
EngineBuilder builder(Mod);
builder.setMArch(MArch);
builder.setMCPU(MCPU);