summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter/Interpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Interpreter.cpp')
-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);
}