Driver: Bug fix, derived .gch names sometimes started with "/".

llvm-svn: 67192
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index f2e965c..0cb1488 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -820,7 +820,10 @@
   // pathname.
   if (JA.getType() == types::TY_PCH) {
     BasePath.eraseComponent();
-    BasePath.appendComponent(NamedOutput);
+    if (BasePath.isEmpty())
+      BasePath = NamedOutput;
+    else
+      BasePath.appendComponent(NamedOutput);
     return C.addResultFile(C.getArgs().MakeArgString(BasePath.c_str()));
   } else {
     return C.addResultFile(NamedOutput);