Folded in a patch by Troy Straszheim to better report errors with -run.

This commit is contained in:
Robert Clipsham
2009-12-28 02:23:41 +00:00
parent cf55f5fcec
commit 42eca04683

View File

@@ -387,6 +387,12 @@ int runExecutable()
// try to call linker!!!
std::string errstr;
int status = llvm::sys::Program::ExecuteAndWait(gExePath, &args[0], NULL, NULL, 0,0, &errstr);
if (status < 0)
{
error("program received signal %d (%s)", -status, strsignal(-status));
return -status;
}
if (!errstr.empty())
{
error("failed to execute program");