From 56c5594515571eab0e02368ed05416b9dac20837 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 18 Mar 2009 09:58:30 +0000 Subject: [PATCH] Driver: Bug fix, derived .gch names sometimes started with "/". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67192 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/Driver.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index f2e965c1a7..0cb14886e9 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -820,7 +820,10 @@ const char *Driver::GetNamedOutputPath(Compilation &C, // 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); -- 2.40.0