diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-02 05:33:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-02 05:33:06 +0000 |
commit | 73c141ac712f90130974e45b0fc3575c40ce88bb (patch) | |
tree | a4dbbf8047e21c00cd35810f767aca59e50b26ee /llvm/tools/bugpoint/ExecutionDriver.cpp | |
parent | 46e18c7f8700d709dae0ce9bc5c2c26098f0978e (diff) | |
download | bcm5719-llvm-73c141ac712f90130974e45b0fc3575c40ce88bb.tar.gz bcm5719-llvm-73c141ac712f90130974e45b0fc3575c40ce88bb.zip |
If the program returns a non-zero exit value, don't leave files laying
around
llvm-svn: 12603
Diffstat (limited to 'llvm/tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ExecutionDriver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp index 3d4e61058ff..969eaabaf6e 100644 --- a/llvm/tools/bugpoint/ExecutionDriver.cpp +++ b/llvm/tools/bugpoint/ExecutionDriver.cpp @@ -265,8 +265,11 @@ bool BugDriver::diffProgram(const std::string &BytecodeFile, &ProgramExitedNonzero); // If we're checking the program exit code, assume anything nonzero is bad. - if (CheckProgramExitCode && ProgramExitedNonzero) + if (CheckProgramExitCode && ProgramExitedNonzero) { + removeFile(Output); + if (RemoveBytecode) removeFile(BytecodeFile); return true; + } std::string Error; bool FilesDifferent = false; |