From b89c1061144d80d48543d27a54cb9cb0eecbee53 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 23 Feb 2009 23:37:18 +0000 Subject: [PATCH] ccc: Don't remove result files on error when -save-temps is present. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65349 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/ccc/ccclib/Driver.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py index 4472ddcc37..2015b2f0ed 100644 --- a/tools/ccc/ccclib/Driver.py +++ b/tools/ccc/ccclib/Driver.py @@ -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: -- 2.40.0