aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/bugpoint/ExecutionDriver.cpp5
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;