aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Driver/Driver.cpp2
-rw-r--r--test/Driver/bindings.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 5c843b004e..2538ed8384 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -790,7 +790,7 @@ const char *Driver::GetNamedOutputPath(Compilation &C,
}
llvm::sys::Path BasePath(BaseInput);
- std::string BaseName(BasePath.getBasename());
+ std::string BaseName(BasePath.getLast());
// Determine what the derived output name should be.
const char *NamedOutput;
diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c
index 254de317e9..73272be59d 100644
--- a/test/Driver/bindings.c
+++ b/test/Driver/bindings.c
@@ -21,6 +21,9 @@
// RUN: grep 'bind - "gcc::Assemble", inputs: \[(pipe)\], output: "/tmp/foo.o"' %t &&
// RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t &&
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -x c-header %s &> %t &&
+// RUN: grep 'bind - "gcc::Precompile", inputs: \[".*bindings.c"\], output: ".*/bindings.c.gch' %t &&
+
// Clang control options
// RUN: clang-driver -ccc-print-bindings -fsyntax-only %s &> %t &&