summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
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
commite9fab9b0778b2df4480d9cd7fa0d2a3ac4c8bfac (patch)
treeca2481c9748e4a5b830a9eed092a0fe7a49315b7 /llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
parent4dcc4637b510002e85efb7cff5420597064c9376 (diff)
downloadbcm5719-llvm-e9fab9b0778b2df4480d9cd7fa0d2a3ac4c8bfac.tar.gz
bcm5719-llvm-e9fab9b0778b2df4480d9cd7fa0d2a3ac4c8bfac.zip
Return an error_code from materializeAllPermanently.
llvm-svn: 199275
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
index 9ee9d9456d1..6d4f6f716fc 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
@@ -34,9 +34,12 @@ extern "C" void LLVMLinkInInterpreter() { }
///
ExecutionEngine *Interpreter::create(Module *M, std::string* ErrStr) {
// Tell this Module to materialize everything and release the GVMaterializer.
- if (M->MaterializeAllPermanently(ErrStr))
+ if (error_code EC = M->materializeAllPermanently()) {
+ if (ErrStr)
+ *ErrStr = EC.message();
// We got an error, just return 0
return 0;
+ }
return new Interpreter(M);
}
OpenPOWER on IntegriCloud