mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Return an error_code from materializeAllPermanently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199275 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user