ccc: PCH generation doesn't strip the path when generating a derived
filename from the input path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62569 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/ccc/ccclib/Driver.py b/tools/ccc/ccclib/Driver.py
index 9622566..42a789b 100644
--- a/tools/ccc/ccclib/Driver.py
+++ b/tools/ccc/ccclib/Driver.py
@@ -720,7 +720,13 @@
                     output = finalOutput
                 # Contruct a named destination?
                 elif atTopLevel or hasSaveTemps:
-                    output = args.makeSeparateArg(os.path.basename(namedOutput),
+                    # As an annoying special case, pch generation
+                    # doesn't strip the pathname.
+                    if phase.type is Types.PCHType:
+                        outputName = namedOutput
+                    else:
+                        outputName = os.path.basename(namedOutput)
+                    output = args.makeSeparateArg(outputName,
                                                   self.parser.oOption)
                 else:
                     # Output to temp file...