If the program returns a non-zero exit value, don't leave files laying

around

llvm-svn: 12603
This commit is contained in:
Chris Lattner 2004-04-02 05:33:06 +00:00
parent 46e18c7f87
commit 73c141ac71
1 changed files with 4 additions and 1 deletions

View File

@ -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;