summaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-14 23:51:27 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-14 23:51:27 +0000
commit1dc66089e6e1e5d226ec1f5e98a0612f68def89d (patch)
tree6df8a2fb819b40fcd1006ca41b1696170e124a27 /tools/lli
parent06a3bddb362ecfc5f3d9ad96301d9b61ef18b552 (diff)
Return an error_code from materializeAllPermanently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-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 c6db51a2b07..8e6669221bf 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);