diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-17 23:39:24 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-17 23:39:24 +0000 |
commit | 9d0703114a00a0430d269858c9a63fdd31f44d14 (patch) | |
tree | a5fec73b2fd25a05f5fbe8cf45bcafb747b46b9f | |
parent | e247cbab4ff39396b64e50c6f64c863325b50aae (diff) |
Driver: Add test case for various parts of binding (no-integrated-cpp,
-ccc-no-clang, -ccc-no-clang-cxx, -ccc-no-clang-cpp, -fsyntax-only).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67131 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Driver/bindings.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c new file mode 100644 index 0000000000..0f93af10cd --- /dev/null +++ b/test/Driver/bindings.c @@ -0,0 +1,36 @@ +// Basic binding. +// RUN: clang-driver -ccc-print-bindings %s &> %t && +// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: "/tmp/foo.s"' %t && +// RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], 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 %s &> %t && +// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: "/tmp/foo.s"' %t && +// RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], 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 -no-integrated-cpp %s &> %t && +// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: "/tmp/foo.i"' %t && +// RUN: grep 'bind - "gcc::Compile", inputs: \["/tmp/foo.i"\], output: "/tmp/foo.s"' %t && +// RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], 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 -no-integrated-cpp -pipe %s &> %t && +// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t && +// RUN: grep 'bind - "gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t && +// 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 && + +// Clang control options + +// RUN: clang-driver -ccc-print-bindings -fsyntax-only %s &> %t && +// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: (nothing)' %t && +// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -fsyntax-only %s &> %t && +// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t && +// RUN: clang-driver -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s &> %t && +// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t && +// RUN: clang-driver -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp -x c++ %s &> %t && +// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: "/tmp/foo.ii"' %t && +// RUN: grep 'bind - "clang", inputs: \["/tmp/foo.ii"\], output: (nothing)' %t && + +// RUN: true |