diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-08 01:45:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-08 01:45:36 +0000 |
commit | 4fcfde4d5c8f25e40720972a5543d538a0dcb220 (patch) | |
tree | 9d74944cc583259bb7d987d3a143214d6759c145 /test/Driver | |
parent | 1e63492a1408c0152251cc9e77cf42b7fd53169f (diff) |
Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver')
29 files changed, 210 insertions, 210 deletions
diff --git a/test/Driver/Xarch.c b/test/Driver/Xarch.c index a2a3fdea30..1bba020dcc 100644 --- a/test/Driver/Xarch.c +++ b/test/Driver/Xarch.c @@ -1,10 +1,10 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log && -// RUN: grep ' "-O2" ' %t.log | count 1 && -// RUN: clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log && -// RUN: grep ' "-O2" ' %t.log | count 0 && -// RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log && -// RUN: not clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log && -// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2 && -// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -S'" %t.log && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log +// RUN: grep ' "-O2" ' %t.log | count 1 +// RUN: clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log +// RUN: grep ' "-O2" ' %t.log | count 0 +// RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log +// RUN: not clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log +// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2 +// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -S'" %t.log // RUN: true diff --git a/test/Driver/analyze.c b/test/Driver/analyze.c index 03810688d1..ff35cc57f1 100644 --- a/test/Driver/analyze.c +++ b/test/Driver/analyze.c @@ -1,7 +1,7 @@ // Verify that the analyzer gets the same flags as normal compilation // (at least for a few key ones). -// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 clang -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log && +// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 clang -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log // RUN: FileCheck --input-file=%t.log %s // CHECK: "-analyze" diff --git a/test/Driver/arm-darwin-builtin.c b/test/Driver/arm-darwin-builtin.c index 5da8074ee3..63cf34332a 100644 --- a/test/Driver/arm-darwin-builtin.c +++ b/test/Driver/arm-darwin-builtin.c @@ -8,7 +8,7 @@ // RUX: not grep -- "-fno-builtin-strcat" %t && // RUX: not grep -- "-fno-builtin-strcpy" %t && -// RUN: clang -ccc-no-clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t && -// RUN: not grep -- "-fno-builtin-strcat" %t && +// RUN: clang -ccc-no-clang -ccc-host-triple x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t +// RUN: not grep -- "-fno-builtin-strcat" %t // RUN: not grep -- "-fno-builtin-strcpy" %t diff --git a/test/Driver/ast.c b/test/Driver/ast.c index 814b597bb1..fd38c108b0 100644 --- a/test/Driver/ast.c +++ b/test/Driver/ast.c @@ -1,6 +1,6 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t && -// RUN: echo 'END' >> %t && -// RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s && +// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t +// RUN: echo 'END' >> %t +// RUN: FileCheck -check-prefix EMIT-AST-PHASES -input-file %t %s // EMIT-AST-PHASES: 0: input, // EMIT-AST-PHASES: , c @@ -9,9 +9,9 @@ // EMIT-AST-PHASES-NOT: 3: // EMIT-AST-PHASES: END -// RUN: touch %t.ast && -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t && -// RUN: echo 'END' >> %t && +// RUN: touch %t.ast +// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.ast 2> %t +// RUN: echo 'END' >> %t // RUN: FileCheck -check-prefix COMPILE-AST-PHASES -input-file %t %s // COMPILE-AST-PHASES: 0: input, diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c index 393739006b..068c95a4b2 100644 --- a/test/Driver/bindings.c +++ b/test/Driver/bindings.c @@ -1,56 +1,56 @@ // Basic binding. -// RUN: clang -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s 2> %t && -// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t && -// RUN: grep '"gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t && -// RUN: grep '"gcc::Assemble", inputs: \[(pipe)\], output: ".*\.o"' %t && -// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t && - -// RUN: clang -ccc-host-triple 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 && +// RUN: clang -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s 2> %t +// RUN: grep '"gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t +// RUN: grep '"gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t +// RUN: grep '"gcc::Assemble", inputs: \[(pipe)\], output: ".*\.o"' %t +// RUN: grep '"gcc::Link", inputs: \[".*\.o"\], output: "a.out"' %t + +// RUN: clang -ccc-host-triple 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 -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t && -// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t && -// RUN: clang -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 && +// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2> %t +// RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t +// RUN: clang -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple 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 -ccc-host-triple i386-apple-darwin9 -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 && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -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 // RUN: true diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c index e0b9e3ada6..237a71329f 100644 --- a/test/Driver/clang-translation.c +++ b/test/Driver/clang-translation.c @@ -1,16 +1,16 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm 2> %t.log && -// RUN: grep '"-triple" "i386-unknown-unknown"' %t.log && -// RUN: grep '"-S"' %t.log && -// RUN: grep '"-disable-free"' %t.log && -// RUN: grep '"--relocation-model" "static"' %t.log && -// RUN: grep '"--disable-fp-elim"' %t.log && -// RUN: grep '"--unwind-tables=0"' %t.log && -// RUN: grep '"--fmath-errno=1"' %t.log && -// RUN: grep '"-Os"' %t.log && -// RUN: grep '"-o" .*clang-translation.*' %t.log && -// RUN: grep '"--asm-verbose"' %t.log && -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log && -// RUN: grep '"--mcpu=yonah"' %t.log && -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log && -// RUN: grep '"--mcpu=core2"' %t.log && +// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm 2> %t.log +// RUN: grep '"-triple" "i386-unknown-unknown"' %t.log +// RUN: grep '"-S"' %t.log +// RUN: grep '"-disable-free"' %t.log +// RUN: grep '"--relocation-model" "static"' %t.log +// RUN: grep '"--disable-fp-elim"' %t.log +// RUN: grep '"--unwind-tables=0"' %t.log +// RUN: grep '"--fmath-errno=1"' %t.log +// RUN: grep '"-Os"' %t.log +// RUN: grep '"-o" .*clang-translation.*' %t.log +// RUN: grep '"--asm-verbose"' %t.log +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log +// RUN: grep '"--mcpu=yonah"' %t.log +// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log +// RUN: grep '"--mcpu=core2"' %t.log // RUN: true diff --git a/test/Driver/clang_cpp.c b/test/Driver/clang_cpp.c index fdbb321e1e..8638465e3a 100644 --- a/test/Driver/clang_cpp.c +++ b/test/Driver/clang_cpp.c @@ -1,4 +1,4 @@ // Verify that -include isn't included twice with -save-temps. -// RUN: clang -S -o - %s -include %t.h -save-temps -### 2> %t.log && +// RUN: clang -S -o - %s -include %t.h -save-temps -### 2> %t.log // RUN: grep '"-include' %t.log | count 1 diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c index 7aecbac49c..199f3e990e 100644 --- a/test/Driver/clang_f_opts.c +++ b/test/Driver/clang_f_opts.c @@ -1,12 +1,12 @@ -// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2> %t && -// RUN: grep -F '"-fblocks"' %t && -// RUN: grep -F '"--fmath-errno=1"' %t && -// RUN: grep -F '"-fpascal-strings"' %t && -// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2> %t && -// RUN: grep -F '"-fblocks=0"' %t && -// RUN: grep -F '"-fbuiltin=0"' %t && -// RUN: grep -F '"-fno-common"' %t && -// RUN: grep -F '"--fmath-errno=0"' %t && -// RUN: grep -F '"-fno-show-source-location"' %t && -// RUN: grep -F '"-fshort-wchar"' %t && +// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2> %t +// RUN: grep -F '"-fblocks"' %t +// RUN: grep -F '"--fmath-errno=1"' %t +// RUN: grep -F '"-fpascal-strings"' %t +// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-wchar %s 2> %t +// RUN: grep -F '"-fblocks=0"' %t +// RUN: grep -F '"-fbuiltin=0"' %t +// RUN: grep -F '"-fno-common"' %t +// RUN: grep -F '"--fmath-errno=0"' %t +// RUN: grep -F '"-fno-show-source-location"' %t +// RUN: grep -F '"-fshort-wchar"' %t // RUN: true diff --git a/test/Driver/cxx-pth.cpp b/test/Driver/cxx-pth.cpp index a06a257538..508696ade8 100644 --- a/test/Driver/cxx-pth.cpp +++ b/test/Driver/cxx-pth.cpp @@ -1,12 +1,12 @@ // Test forced PTH for CXX support. -// RUN: clang -x c++-header %s -### 2> %t.log && -// RUN: FileCheck -check-prefix EMIT -input-file %t.log %s && +// RUN: clang -x c++-header %s -### 2> %t.log +// RUN: FileCheck -check-prefix EMIT -input-file %t.log %s // EMIT: "{{.*}}/clang-cc{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp" -// RUN: touch %t.h.gch && -// RUN: clang -E -include %t.h %s -### 2> %t.log && +// RUN: touch %t.h.gch +// RUN: clang -E -include %t.h %s -### 2> %t.log // RUN: FileCheck -check-prefix USE -input-file %t.log %s // USE: "{{.*}}/clang-cc{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp" diff --git a/test/Driver/darwin-as.c b/test/Driver/darwin-as.c index 486dc2e798..26e59a5ef6 100644 --- a/test/Driver/darwin-as.c +++ b/test/Driver/darwin-as.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t && -// RUN: FileCheck -check-prefix=STATIC_AND_DYNAMIC-32 --input-file %t %s && +// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -x assembler -c %s -static -dynamic 2>%t +// RUN: FileCheck -check-prefix=STATIC_AND_DYNAMIC-32 --input-file %t %s // CHECK-STATIC_AND_DYNAMIC-32: as{{(.exe)?}}" "-arch" "i386" "-force_cpusubtype_ALL" "-static" "-o" -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s -static 2>%t && +// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -x assembler -c %s -static 2>%t // RUN: FileCheck -check-prefix=STATIC-64 --input-file %t %s // CHECK-STATIC-64: as{{(.exe)?}}" "-arch" "x86_64" "-force_cpusubtype_ALL" "-o" diff --git a/test/Driver/darwin-cc.c b/test/Driver/darwin-cc.c index 77193cda44..529a0f383b 100644 --- a/test/Driver/darwin-cc.c +++ b/test/Driver/darwin-cc.c @@ -1,6 +1,6 @@ -// RUN: clang -ccc-no-clang -ccc-host-triple i386-apple-darwin10 -m32 -### -MD -g -fast -Q -dA -mkernel -ansi -aFOO -S -o /tmp/OUTPUTNAME -g0 -gfull -O2 -Werror -pedantic -Wmost -w -std=c99 -trigraphs -v -pg -fFOO -undef -Qn --param a=b -fmudflap -coverage -save-temps -nostdinc -I ARG0 -F ARG1 -I ARG2 -P -MF ARG3 -MG -MP -remap -g3 -H -D ARG4 -U ARG5 -A ARG6 -D ARG7 -U ARG8 -A ARG9 -include ARG10 -pthread %s 2> %t.log && -// RUN: grep ' ".*cc1" "-E" "-nostdinc" "-v" "-I" "ARG0" "-F" "ARG1" "-I" "ARG2" "-P" "-MD" "/tmp/OUTPUTNAME.d" "-MF" "ARG3" "-MG" "-MP" "-MQ" "/tmp/OUTPUTNAME" "-remap" "-dD" "-H" "-D__STATIC__" "-D_REENTRANT" "-D" "ARG4" "-U" "ARG5" "-A" "ARG6" "-D" "ARG7" "-U" "ARG8" "-A" "ARG9" "-include" "ARG10" ".*darwin-cc.c" "-D_MUDFLAP" "-include" "mf-runtime.h" "-mmacosx-version-min=10.6.0" "-m32" "-mkernel" "-mtune=core2" "-ansi" "-std=c99" "-trigraphs" "-Werror" "-pedantic" "-Wmost" "-w" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-O2" "-undef" "-fpch-preprocess" "-o" ".*darwin-cc.i"' %t.log && -// RUN: grep ' ".*cc1" "-fpreprocessed" ".*darwin-cc.i" "-O3" "-dumpbase" ".*darwin-cc.c" "-dA" "-mmacosx-version-min=10.6.0" "-m32" "-mkernel" "-mtune=core2" "-ansi" "-aFOO" "-auxbase-strip" "/tmp/OUTPUTNAME" "-g" "-g0" "-g" "-g3" "-O2" "-Werror" "-pedantic" "-Wmost" "-w" "-ansi" "-std=c99" "-trigraphs" "-version" "-p" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-undef" "-fno-ident" "-o" "/tmp/OUTPUTNAME" "--param" "a=b" "-fno-builtin" "-fno-merge-constants" "-fprofile-arcs" "-ftest-coverage"' %t.log && +// RUN: clang -ccc-no-clang -ccc-host-triple i386-apple-darwin10 -m32 -### -MD -g -fast -Q -dA -mkernel -ansi -aFOO -S -o /tmp/OUTPUTNAME -g0 -gfull -O2 -Werror -pedantic -Wmost -w -std=c99 -trigraphs -v -pg -fFOO -undef -Qn --param a=b -fmudflap -coverage -save-temps -nostdinc -I ARG0 -F ARG1 -I ARG2 -P -MF ARG3 -MG -MP -remap -g3 -H -D ARG4 -U ARG5 -A ARG6 -D ARG7 -U ARG8 -A ARG9 -include ARG10 -pthread %s 2> %t.log +// RUN: grep ' ".*cc1" "-E" "-nostdinc" "-v" "-I" "ARG0" "-F" "ARG1" "-I" "ARG2" "-P" "-MD" "/tmp/OUTPUTNAME.d" "-MF" "ARG3" "-MG" "-MP" "-MQ" "/tmp/OUTPUTNAME" "-remap" "-dD" "-H" "-D__STATIC__" "-D_REENTRANT" "-D" "ARG4" "-U" "ARG5" "-A" "ARG6" "-D" "ARG7" "-U" "ARG8" "-A" "ARG9" "-include" "ARG10" ".*darwin-cc.c" "-D_MUDFLAP" "-include" "mf-runtime.h" "-mmacosx-version-min=10.6.0" "-m32" "-mkernel" "-mtune=core2" "-ansi" "-std=c99" "-trigraphs" "-Werror" "-pedantic" "-Wmost" "-w" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-O2" "-undef" "-fpch-preprocess" "-o" ".*darwin-cc.i"' %t.log +// RUN: grep ' ".*cc1" "-fpreprocessed" ".*darwin-cc.i" "-O3" "-dumpbase" ".*darwin-cc.c" "-dA" "-mmacosx-version-min=10.6.0" "-m32" "-mkernel" "-mtune=core2" "-ansi" "-aFOO" "-auxbase-strip" "/tmp/OUTPUTNAME" "-g" "-g0" "-g" "-g3" "-O2" "-Werror" "-pedantic" "-Wmost" "-w" "-ansi" "-std=c99" "-trigraphs" "-version" "-p" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-undef" "-fno-ident" "-o" "/tmp/OUTPUTNAME" "--param" "a=b" "-fno-builtin" "-fno-merge-constants" "-fprofile-arcs" "-ftest-coverage"' %t.log // RUN: true diff --git a/test/Driver/darwin-ld.c b/test/Driver/darwin-ld.c index 9165a4a901..b0334f010e 100644 --- a/test/Driver/darwin-ld.c +++ b/test/Driver/darwin-ld.c @@ -1,27 +1,27 @@ // Check that ld gets arch_multiple. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch i386 -arch x86_64 %s -### -o foo 2> %t.log && -// RUN: grep '".*ld.*" .*"-arch_multiple" "-final_output" "foo"' %t.log && - -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO -static 2> %t.log && -// RUN: grep '"-lcrt0.o" .*"-lgcc_static"' %t.log && -// RUN: grep '"-lgcc"' %t.log | count 0 && -// RUN: clang -ccc-host-triple i386-apple-darwin7 -### -filelist FOO 2> %t.log && -// RUN: grep '"-lcrt1.o" .*"-lgcc" "-lSystem"' %t.log && -// RUN: grep '"-lgcc_s"' %t.log | count 0 && -// RUN: clang -ccc-host-triple i386-apple-darwin8 -### -filelist FOO 2> %t.log && -// RUN: grep '"-lcrt1.o" .*"-lgcc_s.10.4" "-lgcc" "-lSystem"' %t.log && -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO 2> %t.log && -// RUN: grep '"-lcrt1.10.5.o" .*"-lgcc_s.10.5" "-lgcc" "-lSystem"' %t.log && -// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -filelist FOO 2> %t.log && -// RUN: grep '"-lcrt1.10.6.o" .*"-lSystem" "-lgcc"' %t.log && -// RUN: grep '"-lgcc_s"' %t.log | count 0 && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch i386 -arch x86_64 %s -### -o foo 2> %t.log +// RUN: grep '".*ld.*" .*"-arch_multiple" "-final_output" "foo"' %t.log + +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO -static 2> %t.log +// RUN: grep '"-lcrt0.o" .*"-lgcc_static"' %t.log +// RUN: grep '"-lgcc"' %t.log | count 0 +// RUN: clang -ccc-host-triple i386-apple-darwin7 -### -filelist FOO 2> %t.log +// RUN: grep '"-lcrt1.o" .*"-lgcc" "-lSystem"' %t.log +// RUN: grep '"-lgcc_s"' %t.log | count 0 +// RUN: clang -ccc-host-triple i386-apple-darwin8 -### -filelist FOO 2> %t.log +// RUN: grep '"-lcrt1.o" .*"-lgcc_s.10.4" "-lgcc" "-lSystem"' %t.log +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -filelist FOO 2> %t.log +// RUN: grep '"-lcrt1.10.5.o" .*"-lgcc_s.10.5" "-lgcc" "-lSystem"' %t.log +// RUN: clang -ccc-host-triple i386-apple-darwin10 -### -filelist FOO 2> %t.log +// RUN: grep '"-lcrt1.10.6.o" .*"-lSystem" "-lgcc"' %t.log +// RUN: grep '"-lgcc_s"' %t.log | count 0 // Make sure we run dsymutil on source input files. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -g %s -o BAR 2> %t.log && -// RUN: grep '".*dsymutil" "BAR"' %t.log && -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log && -// RUN: grep '".*dsymutil" "BAR"' %t.log && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -g %s -o BAR 2> %t.log +// RUN: grep '".*dsymutil" "BAR"' %t.log +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -g -filelist FOO %s -o BAR 2> %t.log +// RUN: grep '".*dsymutil" "BAR"' %t.log // Splatter test case. This is gross, but it works for now. For the // driver, just getting coverage of the tool code and checking the @@ -32,12 +32,12 @@ // // Note that at conception, this exactly matches gcc. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -A ARG0 -F ARG1 -L ARG2 -Mach -T ARG4 -X -Z -all_load -allowable_client ARG8 -bind_at_load -compatibility_version ARG11 -current_version ARG12 -d -dead_strip -dylib_file ARG14 -dylinker -dylinker_install_name ARG16 -dynamic -dynamiclib -e ARG19 -exported_symbols_list ARG20 -fexceptions -flat_namespace -fnested-functions -fopenmp -force_cpusubtype_ALL -fpie -fprofile-arcs -headerpad_max_install_names -image_base ARG29 -init ARG30 -install_name ARG31 -m ARG33 -miphoneos-version-min=2.0 -mmacosx-version-min=10.3.2 -multi_module -multiply_defined ARG37 -multiply_defined_unused ARG38 -no_dead_strip_inits_and_terms -nodefaultlibs -nofixprebinding -nomultidefs -noprebind -noseglinkedit -nostartfiles -nostdlib -pagezero_size ARG54 -pg -prebind -prebind_all_twolevel_modules -preload -r -read_only_relocs ARG55 -s -sectalign ARG57_0 ARG57_1 ARG57_2 -sectcreate ARG58_0 ARG58_1 ARG58_2 -sectobjectsymbols ARG59_0 ARG59_1 -sectorder ARG60_0 ARG60_1 ARG60_2 -seg1addr ARG61 -seg_addr_table ARG62 -seg_addr_table_filename ARG63 -segaddr ARG64_0 ARG64_1 -segcreate ARG65_0 ARG65_1 ARG65_2 -seglinkedit -segprot ARG67_0 ARG67_1 ARG67_2 -segs_read_FOO -segs_read_only_addr ARG69 -segs_read_write_addr ARG70 -shared-libgcc -single_module -static -static-libgcc -sub_library ARG77 -sub_umbrella ARG78 -t -twolevel_namespace -twolevel_namespace_hints -u ARG82 -umbrella ARG83 -undefined ARG84 -unexported_symbols_list ARG85 -w -weak_reference_mismatches ARG87 -whatsloaded -whyload -y -filelist FOO 2> %t.log && -// RUN: grep '".*ld.*" "-static" "-dylib" "-dylib_compatibility_version" "ARG11" "-dylib_current_version" "ARG12" "-arch" "i386" "-dylib_install_name" "ARG31" "-all_load" "-allowable_client" "ARG8" "-bind_at_load" "-dead_strip" "-no_dead_strip_inits_and_terms" "-dylib_file" "ARG14" "-dynamic" "-exported_symbols_list" "ARG20" "-flat_namespace" "-headerpad_max_install_names" "-image_base" "ARG29" "-init" "ARG30" "-macosx_version_min" "10.3.2" "-iphoneos_version_min" "2.0" "-nomultidefs" "-multi_module" "-single_module" "-multiply_defined" "ARG37" "-multiply_defined_unused" "ARG38" "-pie" "-prebind" "-noprebind" "-nofixprebinding" "-prebind_all_twolevel_modules" "-read_only_relocs" "ARG55" "-sectcreate" "ARG58_0" "ARG58_1" "ARG58_2" "-sectorder" "ARG60_0" "ARG60_1" "ARG60_2" "-seg1addr" "ARG61" "-segprot" "ARG67_0" "ARG67_1" "ARG67_2" "-segaddr" "ARG64_0" "ARG64_1" "-segs_read_only_addr" "ARG69" "-segs_read_write_addr" "ARG70" "-seg_addr_table" "ARG62" "-seg_addr_table_filename" "ARG63" "-sub_library" "ARG77" "-sub_umbrella" "ARG78" "-twolevel_namespace" "-twolevel_namespace_hints" "-umbrella" "ARG83" "-undefined" "ARG84" "-unexported_symbols_list" "ARG85" "-weak_reference_mismatches" "ARG87" "-X" "-y" "-w" "-pagezero_size" "ARG54" "-segs_read_FOO" "-seglinkedit" "-noseglinkedit" "-sectalign" "ARG57_0" "ARG57_1" "ARG57_2" "-sectobjectsymbols" "ARG59_0" "ARG59_1" "-segcreate" "ARG65_0" "ARG65_1" "ARG65_2" "-whyload" "-whatsloaded" "-dylinker_install_name" "ARG16" "-dylinker" "-Mach" "-d" "-s" "-t" "-Z" "-u" "ARG82" "-undefined" "ARG84" "-A" "ARG0" "-e" "ARG19" "-m" "ARG33" "-r" "-o" "a.out" "-L" "ARG2" "-lgomp" "-L/usr/lib/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1/../../../i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1/../../.." "-filelist" "FOO" "-lgcov" "-allow_stack_execute" "-T" "ARG4" "-F" "ARG1"' %t.log && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -A ARG0 -F ARG1 -L ARG2 -Mach -T ARG4 -X -Z -all_load -allowable_client ARG8 -bind_at_load -compatibility_version ARG11 -current_version ARG12 -d -dead_strip -dylib_file ARG14 -dylinker -dylinker_install_name ARG16 -dynamic -dynamiclib -e ARG19 -exported_symbols_list ARG20 -fexceptions -flat_namespace -fnested-functions -fopenmp -force_cpusubtype_ALL -fpie -fprofile-arcs -headerpad_max_install_names -image_base ARG29 -init ARG30 -install_name ARG31 -m ARG33 -miphoneos-version-min=2.0 -mmacosx-version-min=10.3.2 -multi_module -multiply_defined ARG37 -multiply_defined_unused ARG38 -no_dead_strip_inits_and_terms -nodefaultlibs -nofixprebinding -nomultidefs -noprebind -noseglinkedit -nostartfiles -nostdlib -pagezero_size ARG54 -pg -prebind -prebind_all_twolevel_modules -preload -r -read_only_relocs ARG55 -s -sectalign ARG57_0 ARG57_1 ARG57_2 -sectcreate ARG58_0 ARG58_1 ARG58_2 -sectobjectsymbols ARG59_0 ARG59_1 -sectorder ARG60_0 ARG60_1 ARG60_2 -seg1addr ARG61 -seg_addr_table ARG62 -seg_addr_table_filename ARG63 -segaddr ARG64_0 ARG64_1 -segcreate ARG65_0 ARG65_1 ARG65_2 -seglinkedit -segprot ARG67_0 ARG67_1 ARG67_2 -segs_read_FOO -segs_read_only_addr ARG69 -segs_read_write_addr ARG70 -shared-libgcc -single_module -static -static-libgcc -sub_library ARG77 -sub_umbrella ARG78 -t -twolevel_namespace -twolevel_namespace_hints -u ARG82 -umbrella ARG83 -undefined ARG84 -unexported_symbols_list ARG85 -w -weak_reference_mismatches ARG87 -whatsloaded -whyload -y -filelist FOO 2> %t.log +// RUN: grep '".*ld.*" "-static" "-dylib" "-dylib_compatibility_version" "ARG11" "-dylib_current_version" "ARG12" "-arch" "i386" "-dylib_install_name" "ARG31" "-all_load" "-allowable_client" "ARG8" "-bind_at_load" "-dead_strip" "-no_dead_strip_inits_and_terms" "-dylib_file" "ARG14" "-dynamic" "-exported_symbols_list" "ARG20" "-flat_namespace" "-headerpad_max_install_names" "-image_base" "ARG29" "-init" "ARG30" "-macosx_version_min" "10.3.2" "-iphoneos_version_min" "2.0" "-nomultidefs" "-multi_module" "-single_module" "-multiply_defined" "ARG37" "-multiply_defined_unused" "ARG38" "-pie" "-prebind" "-noprebind" "-nofixprebinding" "-prebind_all_twolevel_modules" "-read_only_relocs" "ARG55" "-sectcreate" "ARG58_0" "ARG58_1" "ARG58_2" "-sectorder" "ARG60_0" "ARG60_1" "ARG60_2" "-seg1addr" "ARG61" "-segprot" "ARG67_0" "ARG67_1" "ARG67_2" "-segaddr" "ARG64_0" "ARG64_1" "-segs_read_only_addr" "ARG69" "-segs_read_write_addr" "ARG70" "-seg_addr_table" "ARG62" "-seg_addr_table_filename" "ARG63" "-sub_library" "ARG77" "-sub_umbrella" "ARG78" "-twolevel_namespace" "-twolevel_namespace_hints" "-umbrella" "ARG83" "-undefined" "ARG84" "-unexported_symbols_list" "ARG85" "-weak_reference_mismatches" "ARG87" "-X" "-y" "-w" "-pagezero_size" "ARG54" "-segs_read_FOO" "-seglinkedit" "-noseglinkedit" "-sectalign" "ARG57_0" "ARG57_1" "ARG57_2" "-sectobjectsymbols" "ARG59_0" "ARG59_1" "-segcreate" "ARG65_0" "ARG65_1" "ARG65_2" "-whyload" "-whatsloaded" "-dylinker_install_name" "ARG16" "-dylinker" "-Mach" "-d" "-s" "-t" "-Z" "-u" "ARG82" "-undefined" "ARG84" "-A" "ARG0" "-e" "ARG19" "-m" "ARG33" "-r" "-o" "a.out" "-L" "ARG2" "-lgomp" "-L/usr/lib/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1/../../../i686-apple-darwin.*/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin.*/4.2.1/../../.." "-filelist" "FOO" "-lgcov" "-allow_stack_execute" "-T" "ARG4" "-F" "ARG1"' %t.log // Don't run dsymutil on a fat build of an executable. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -arch i386 -arch x86_64 -g %s 2> %t.log && -// RUN: grep dsymutil %t.log | count 0 && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -arch i386 -arch x86_64 -g %s 2> %t.log +// RUN: grep dsymutil %t.log | count 0 // RUN: true diff --git a/test/Driver/default-toolchain.c b/test/Driver/default-toolchain.c index 0e8a02679e..9cebdfe581 100644 --- a/test/Driver/default-toolchain.c +++ b/test/Driver/default-toolchain.c @@ -1,8 +1,8 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -m64 -v 2> %t && -// RUN: grep 'Target: x86_64-unknown-unknown' %t && +// RUN: clang -ccc-host-triple i386-unknown-unknown -m64 -v 2> %t +// RUN: grep 'Target: x86_64-unknown-unknown' %t -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc -m64 -v 2> %t && -// RUN: grep 'Target: powerpc64-apple-darwin9' %t && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc -m64 -v 2> %t +// RUN: grep 'Target: powerpc64-apple-darwin9' %t -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc64 -m32 -v 2> %t && +// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch ppc64 -m32 -v 2> %t // RUN: grep 'Target: powerpc-apple-darwin9' %t diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c index f0b09f7e23..40f12e4d7f 100644 --- a/test/Driver/dragonfly.c +++ b/test/Driver/dragonfly.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log && +// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log // RUN: FileCheck -input-file %t.log %s // CHECK: clang-cc{{.*}}" "-triple" "amd64-pc-dragonfly" diff --git a/test/Driver/emit-llvm.c b/test/Driver/emit-llvm.c index a4aabe7256..27007c68c2 100644 --- a/test/Driver/emit-llvm.c +++ b/test/Driver/emit-llvm.c |