diff options
author | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
---|---|---|
committer | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
commit | 222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch) | |
tree | 7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/Driver/bindings.c | |
parent | 3d206f03985b50beacae843d880bccdc91a9f424 (diff) |
Add the clang library to the repo (with some of my changes, too).
Diffstat (limited to 'clang/test/Driver/bindings.c')
-rw-r--r-- | clang/test/Driver/bindings.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/clang/test/Driver/bindings.c b/clang/test/Driver/bindings.c new file mode 100644 index 0000000..a7cda19 --- /dev/null +++ b/clang/test/Driver/bindings.c @@ -0,0 +1,49 @@ +// Basic binding. +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings %s 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t +// RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t +// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t + +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2> %t +// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: ".*\.s"' %t +// RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t +// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t + +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2> %t +// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t +// RUN: grep '"gcc::Compile", inputs: \[".*\.i"\], output: ".*\.s"' %t +// RUN: grep '"gcc::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t +// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t + +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2> %t +// RUN: grep '"gcc::Precompile", inputs: \[".*bindings.c"\], output: ".*bindings.c.gch' %t + +// Clang control options + +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t +// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t +// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t +// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp %s 2> %t +// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: ".*\.i"' %t +// RUN: grep '"clang", inputs: \[".*\.i"\], output: (nothing)' %t +// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs i386 %s -S -arch ppc 2> %t +// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t +// RUN: %clang -target i386-apple-darwin9 -ccc-print-bindings -ccc-clang-archs powerpc %s -S -arch ppc 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t + +// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t +// RUN: %clang -target powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2> %t +// RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t + +// Darwin bindings +// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: ".*\.s"' %t +// RUN: grep '"darwin::Assemble", inputs: \[".*\.s"\], output: ".*\.o"' %t +// RUN: grep '"darwin::Link", inputs: \[".*\.o"\], output: "a.out"' %t + |