mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
Added a mechanism for the IR interpreter to return
an error along with its boolean result. The expression parser reports this error if the interpreter fails and the expression could not be run in the target. llvm-svn: 148870
This commit is contained in:
@@ -2663,11 +2663,10 @@ IRForTarget::runOnModule (Module &llvm_module)
|
||||
IRInterpreter interpreter (*m_decl_map,
|
||||
m_error_stream);
|
||||
|
||||
if (interpreter.maybeRunOnFunction(m_const_result, m_result_name, m_result_type, *function, llvm_module))
|
||||
{
|
||||
m_interpret_success = true;
|
||||
interpreter.maybeRunOnFunction(m_const_result, m_result_name, m_result_type, *function, llvm_module, m_interpreter_error);
|
||||
|
||||
if (m_interpreter_error.Success())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (log && log->GetVerbose())
|
||||
|
||||
Reference in New Issue
Block a user