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
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index 4472ddc..2015b2f 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -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: