[cfe-commits] r67153 - in /cfe/trunk: lib/Driver/Driver.cpp test/Driver/bindings.c
Daniel Dunbar
daniel at zuster.org
Tue Mar 17 19:00:31 PDT 2009
Author: ddunbar
Date: Tue Mar 17 21:00:31 2009
New Revision: 67153
URL: http://llvm.org/viewvc/llvm-project?rev=67153&view=rev
Log:
Driver: Add test for binding of precompile; exposed bug due to my
flawed idea that llvm::sys::Path::getBasename was a version of
basename().
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/bindings.c
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=67153&r1=67152&r2=67153&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Mar 17 21:00:31 2009
@@ -790,7 +790,7 @@
}
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;
Modified: cfe/trunk/test/Driver/bindings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/bindings.c?rev=67153&r1=67152&r2=67153&view=diff
==============================================================================
--- cfe/trunk/test/Driver/bindings.c (original)
+++ cfe/trunk/test/Driver/bindings.c Tue Mar 17 21:00:31 2009
@@ -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 &&
More information about the cfe-commits
mailing list