summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-11-09 17:49:19 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-11-09 17:49:19 +0000
commit7f00d0a125b98a1c68b05e7b6be4e89f39bf8240 (patch)
treeb13eb173d29b968498f03be9eceaf03f58752d76 /llvm/lib/ExecutionEngine/Interpreter
parent9934c54cca1bc94e02f58c3fe1209e72312c115b (diff)
downloadbcm5719-llvm-7f00d0a125b98a1c68b05e7b6be4e89f39bf8240.tar.gz
bcm5719-llvm-7f00d0a125b98a1c68b05e7b6be4e89f39bf8240.zip
Bitcode: Change the materializer interface to return llvm::Error.
Differential Revision: https://reviews.llvm.org/D26439 llvm-svn: 286382
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
index bc7da2e4f6a..9818adfff82 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp
@@ -35,9 +35,13 @@ extern "C" void LLVMLinkInInterpreter() { }
ExecutionEngine *Interpreter::create(std::unique_ptr<Module> M,
std::string *ErrStr) {
// Tell this Module to materialize everything and release the GVMaterializer.
- if (std::error_code EC = M->materializeAll()) {
+ if (Error Err = M->materializeAll()) {
+ std::string Msg;
+ handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) {
+ Msg = EIB.message();
+ });
if (ErrStr)
- *ErrStr = EC.message();
+ *ErrStr = Msg;
// We got an error, just return 0
return nullptr;
}
OpenPOWER on IntegriCloud