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:
Sean Callanan
2012-01-24 22:06:48 +00:00
parent 77dbd786c8
commit 175a0d04b6
6 changed files with 159 additions and 66 deletions

View File

@@ -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())