aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-09 01:13:31 +0000
committerDan Gohman <gohman@apple.com>2010-11-09 01:13:31 +0000
commite1f2e502b99fa0bafa6da2976b0cad69dcf6ecd6 (patch)
tree527f7f75f326e5bfc906d9d9ce2976aa545711a6 /tools
parent9ac18d562d9839e881165e8f8a25d87b9f8279e8 (diff)
downloadexternal_llvm-e1f2e502b99fa0bafa6da2976b0cad69dcf6ecd6.zip
external_llvm-e1f2e502b99fa0bafa6da2976b0cad69dcf6ecd6.tar.gz
external_llvm-e1f2e502b99fa0bafa6da2976b0cad69dcf6ecd6.tar.bz2
Fix some places where error messages were being swallowed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/bugpoint/ToolRunner.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index ea82a6c..a15a840 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/ToolRunner.cpp
@@ -59,7 +59,8 @@ static int RunProgramWithTimeout(const sys::Path &ProgramPath,
const sys::Path &StdOutFile,
const sys::Path &StdErrFile,
unsigned NumSeconds = 0,
- unsigned MemoryLimit = 0) {
+ unsigned MemoryLimit = 0,
+ std::string *ErrMsg = 0) {
const sys::Path* redirects[3];
redirects[0] = &StdInFile;
redirects[1] = &StdOutFile;
@@ -76,7 +77,7 @@ static int RunProgramWithTimeout(const sys::Path &ProgramPath,
return
sys::Program::ExecuteAndWait(ProgramPath, Args, 0, redirects,
- NumSeconds, MemoryLimit);
+ NumSeconds, MemoryLimit, ErrMsg);
}
/// RunProgramRemotelyWithTimeout - This function runs the given program
@@ -230,7 +231,7 @@ int LLI::ExecuteProgram(const std::string &Bitcode,
);
return RunProgramWithTimeout(sys::Path(LLIPath), &LLIArgs[0],
sys::Path(InputFile), sys::Path(OutputFile), sys::Path(OutputFile),
- Timeout, MemoryLimit);
+ Timeout, MemoryLimit, Error);
}
// LLI create method - Try to find the LLI executable
@@ -301,7 +302,7 @@ int CustomExecutor::ExecuteProgram(const std::string &Bitcode,
return RunProgramWithTimeout(
sys::Path(ExecutionCommand),
&ProgramArgs[0], sys::Path(InputFile), sys::Path(OutputFile),
- sys::Path(OutputFile), Timeout, MemoryLimit);
+ sys::Path(OutputFile), Timeout, MemoryLimit, Error);
}
// Custom execution environment create method, takes the execution command
@@ -518,7 +519,7 @@ int JIT::ExecuteProgram(const std::string &Bitcode,
DEBUG(errs() << "\nSending output to " << OutputFile << "\n");
return RunProgramWithTimeout(sys::Path(LLIPath), &JITArgs[0],
sys::Path(InputFile), sys::Path(OutputFile), sys::Path(OutputFile),
- Timeout, MemoryLimit);
+ Timeout, MemoryLimit, Error);
}
/// createJIT - Try to find the LLI executable
@@ -772,7 +773,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
DEBUG(errs() << "<run locally>");
return RunProgramWithTimeout(OutputBinary, &ProgramArgs[0],
sys::Path(InputFile), sys::Path(OutputFile), sys::Path(OutputFile),
- Timeout, MemoryLimit);
+ Timeout, MemoryLimit, Error);
} else {
outs() << "<run remotely>"; outs().flush();
return RunProgramRemotelyWithTimeout(sys::Path(RemoteClientPath),