[cfe-commits] r65349 - /cfe/trunk/tools/ccc/ccclib/Driver.py

Daniel Dunbar daniel at zuster.org
Mon Feb 23 15:37:18 PST 2009


Author: ddunbar
Date: Mon Feb 23 17:37:18 2009
New Revision: 65349

URL: http://llvm.org/viewvc/llvm-project?rev=65349&view=rev
Log:
ccc: Don't remove result files on error when -save-temps is present.

Modified:
    cfe/trunk/tools/ccc/ccclib/Driver.py

Modified: cfe/trunk/tools/ccc/ccclib/Driver.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Driver.py?rev=65349&r1=65348&r2=65349&view=diff

==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Driver.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Driver.py Mon Feb 23 17:37:18 2009
@@ -228,10 +228,11 @@
             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:





More information about the cfe-commits mailing list