From b3f5ab8d5b5837b1d6a303fa5a91928ccdb27346 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 2 Apr 2004 05:33:06 +0000 Subject: [PATCH] If the program returns a non-zero exit value, don't leave files laying around llvm-svn: 12603 --- tools/bugpoint/ExecutionDriver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 3d4e61058ff..969eaabaf6e 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;