ccc: Don't remove result files on error when -save-temps is present.

llvm-svn: 65349
This commit is contained in:
Daniel Dunbar 2009-02-23 23:37:18 +00:00
parent 29b8697393
commit cdff38b1f6
1 changed files with 5 additions and 4 deletions

View File

@ -228,10 +228,11 @@ class Driver(object):
try:
self.executeJobs(args, jobs)
except:
for f in self.resultFiles:
# Fail if removing a result fails:
if os.path.exists(f):
os.remove(f)
if not args.getLastArg(self.parser.saveTempsOption):
for f in self.resultFiles:
# Fail if removing a result fails:
if os.path.exists(f):
os.remove(f)
raise
finally:
for f in self.tempFiles: