forked from OSchip/llvm-project
Add -silence-passes option to bugpoint. This option suppresses output generated
when bugpoint is running passes in a child process. llvm-svn: 52234
This commit is contained in:
parent
1cc695efd7
commit
4ba5df8a68
|
@ -114,6 +114,8 @@ int BugDriver::runPassesAsChild(const std::vector<const PassInfo*> &Passes) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
cl::opt<bool> SilencePasses("silence-passes", cl::desc("Suppress output of running passes (both stdout and stderr)"));
|
||||
|
||||
/// runPasses - Run the specified passes on Program, outputting a bitcode file
|
||||
/// and writing the filename into OutputFile if successful. If the
|
||||
/// optimizations fail for some reason (optimizer crashes), return true,
|
||||
|
@ -192,7 +194,12 @@ bool BugDriver::runPasses(const std::vector<const PassInfo*> &Passes,
|
|||
prog = sys::Program::FindProgramByName("valgrind");
|
||||
else
|
||||
prog = tool;
|
||||
int result = sys::Program::ExecuteAndWait(prog, args, 0, 0,
|
||||
|
||||
// Redirect stdout and stderr to nowhere if SilencePasses is given
|
||||
sys::Path Nowhere;
|
||||
const sys::Path *Redirects[3] = {0, &Nowhere, &Nowhere};
|
||||
|
||||
int result = sys::Program::ExecuteAndWait(prog, args, 0, (SilencePasses ? Redirects : 0),
|
||||
Timeout, MemoryLimit, &ErrMsg);
|
||||
|
||||
// If we are supposed to delete the bitcode file or if the passes crashed,
|
||||
|
|
Loading…
Reference in New Issue