Made IRForTarget error out correctly when it can't

complete the result type, preventing crashes later.

llvm-svn: 147107
This commit is contained in:
Sean Callanan 2011-12-21 23:44:05 +00:00
parent e04f51662c
commit 960534c866
1 changed files with 2 additions and 1 deletions

View File

@ -675,8 +675,9 @@ IRForTarget::CreateResultVariable (llvm::Function &llvm_function)
log->Printf("Result type has size 0");
if (m_error_stream)
m_error_stream->Printf("Internal error [IRForTarget]: Result type '%s' has invalid size\n",
m_error_stream->Printf("Error [IRForTarget]: Size of result type '%s' couldn't be determined\n",
type_desc_stream.GetData());
return false;
}
if (log)