diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-18 02:00:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-18 02:00:31 +0000 |
commit | 5796bf4913832bd1165c3ff5e04838d150de1c4c (patch) | |
tree | 24b413b935426c85de9367690ba33c2c40996e1d | |
parent | c2fdb0780b071d7e8771f970630ac57fd393d983 (diff) |
Driver: Add test for binding of precompile; exposed bug due to my
flawed idea that llvm::sys::Path::getBasename was a version of
basename().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67153 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/Driver.cpp | 2 | ||||
-rw-r--r-- | test/Driver/bindings.c | 3 |
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 && |