From 5ca98fd98791947eba83a1ed3f2c8191ef7afa6c Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 24 Nov 2014 09:08:18 +0000 Subject: Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_350/final@216957 --- lib/ExecutionEngine/Interpreter/Interpreter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/ExecutionEngine/Interpreter/Interpreter.cpp') diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.cpp b/lib/ExecutionEngine/Interpreter/Interpreter.cpp index 9ee9d9456d1d..814efcc27fcb 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 (std::error_code EC = M->materializeAllPermanently()) { + if (ErrStr) + *ErrStr = EC.message(); // We got an error, just return 0 - return 0; + return nullptr; + } return new Interpreter(M); } -- cgit v1.2.3