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 | 58d84ced5f7367335e43ea54e5daf32a4fdaefb6 (patch) | |
tree | c9a8d790ccdce8cfc899b6a3fa310c05327e46b3 /tools/bugpoint | |
parent | 76351aa57e99ab9a947b899e0677933f3a385b4d (diff) | |
download | llvm-58d84ced5f7367335e43ea54e5daf32a4fdaefb6.tar.gz llvm-58d84ced5f7367335e43ea54e5daf32a4fdaefb6.tar.bz2 llvm-58d84ced5f7367335e43ea54e5daf32a4fdaefb6.tar.xz |
If the program returns a non-zero exit value, don't leave files laying
around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint')
-rw-r--r-- | tools/bugpoint/ExecutionDriver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 3d4e61058f..969eaabaf6 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/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; |