Driver: Result files shouldn't be removed on failure when -save-temps

is specified.
 - No easy way to make a safe test case for this (given where the
   driver is supposed to put temp files).

llvm-svn: 67632
This commit is contained in:
Daniel Dunbar 2009-03-24 17:49:01 +00:00
parent f259f3f312
commit 827faf8f2b
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ int Compilation::Execute() const {
CleanupFileList(TempFiles);
// If the compilation failed, remove result files as well.
if (Res != 0)
if (Res != 0 && !getArgs().hasArg(options::OPT_save_temps))
CleanupFileList(ResultFiles, true);
return Res;