diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-14 23:51:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-14 23:51:27 +0000 |
commit | 1dc66089e6e1e5d226ec1f5e98a0612f68def89d (patch) | |
tree | 6df8a2fb819b40fcd1006ca41b1696170e124a27 /lib/ExecutionEngine/Interpreter | |
parent | 06a3bddb362ecfc5f3d9ad96301d9b61ef18b552 (diff) | |
download | llvm-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.cpp | 5 |
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); } |