summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter
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 /lib/ExecutionEngine/Interpreter
parent06a3bddb362ecfc5f3d9ad96301d9b61ef18b552 (diff)
downloadllvm-1dc66089e6e1e5d226ec1f5e98a0612f68def89d.tar.gz
llvm-1dc66089e6e1e5d226ec1f5e98a0612f68def89d.tar.bz2
llvm-1dc66089e6e1e5d226ec1f5e98a0612f68def89d.tar.xz
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 'lib/ExecutionEngine/Interpreter')
-rw-r--r--lib/ExecutionEngine/Interpreter/Interpreter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/lib/ExecutionEngine/Interpreter/Interpreter.cpp
index 9ee9d9456d..6d4f6f716f 100644
--- a/lib/ExecutionEngine/Interpreter/Interpreter.cpp
+++ b/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);
}