diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-01-01 10:34:51 +0000 |
| commit | abe15e553e58165e7692c0d0842865c488ed7b45 (patch) | |
| tree | 1e68501209c9133fbda8d45171e59f8d6f12dd55 /test/Driver | |
| parent | 34d02d0b37f16015f317a935c48ce8b7b64ae77b (diff) | |
Notes
Diffstat (limited to 'test/Driver')
34 files changed, 122 insertions, 101 deletions
diff --git a/test/Driver/Xarch.c b/test/Driver/Xarch.c index ba6f5c63d4d4b..b35bf6c92dffc 100644 --- a/test/Driver/Xarch.c +++ b/test/Driver/Xarch.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %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: %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: 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 diff --git a/test/Driver/analyze.c b/test/Driver/analyze.c index bdbfbbfd88dd2..2f850bc73ddee 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 63cf34332ae1f..9d4cee0f05e31 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: %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 fd38c108b0514..6e5857fba5e32 100644 --- a/test/Driver/ast.c +++ b/test/Driver/ast.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -emit-ast %s 2> %t +// 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 @@ -10,7 +10,7 @@ // 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: %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 diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c index 41d6a7ced1759..2271ab5c64591 100644 --- a/test/Driver/bindings.c +++ b/test/Driver/bindings.c @@ -1,54 +1,54 @@ // Basic binding. -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings %s 2> %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: %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: %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: %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: %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: %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: %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: %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: %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: %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: %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: %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: %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: %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: %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 diff --git a/test/Driver/ccc-add-args.c b/test/Driver/ccc-add-args.c index afd9bd6f7650e..d9a16cbfb4605 100644 --- a/test/Driver/ccc-add-args.c +++ b/test/Driver/ccc-add-args.c @@ -1,4 +1,4 @@ -// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" clang -### 2>&1 | FileCheck %s +// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" %clang -### 2>&1 | FileCheck %s // CHECK: Option 0 - Name: "-ccc-echo", Values: {} // CHECK: Option 1 - Name: "-ccc-print-options", Values: {} // CHECK: Option 2 - Name: "-v", Values: {} diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c index 762ebb7944b22..2464f03b7a1e0 100644 --- a/test/Driver/clang-translation.c +++ b/test/Driver/clang-translation.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -### -S -O0 -Os %s -o %t.s -fverbose-asm -funwind-tables -fvisibility=hidden 2> %t.log // RUN: grep '"-triple" "i386-unknown-unknown"' %t.log // RUN: grep '"-S"' %t.log // RUN: grep '"-disable-free"' %t.log @@ -9,12 +9,12 @@ // RUN: grep '"-o" .*clang-translation.*' %t.log // RUN: grep '"-masm-verbose"' %t.log // RUN: grep '"-fvisibility" "hidden"' %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-apple-darwin9 -### -S %s -o %t.s 2> %t.log +// RUN: grep '"-target-cpu" "yonah"' %t.log +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log +// RUN: grep '"-target-cpu" "core2"' %t.log -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ // RUN: -arch armv7 // RUN: FileCheck -check-prefix=ARMV7_DEFAULT %s < %t.log // ARMV7_DEFAULT: clang @@ -24,7 +24,7 @@ // ARMV7_DEFAULT-NOT: "-msoft-float" // ARMV7_DEFAULT: "-x" "c" -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ // RUN: -arch armv7 -msoft-float // RUN: FileCheck -check-prefix=ARMV7_SOFTFLOAT %s < %t.log // ARMV7_SOFTFLOAT: clang @@ -33,7 +33,7 @@ // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft" // ARMV7_SOFTFLOAT: "-x" "c" -// RUN: clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ +// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \ // RUN: -arch armv7 -mhard-float // RUN: FileCheck -check-prefix=ARMV7_HARDFLOAT %s < %t.log // ARMV7_HARDFLOAT: clang diff --git a/test/Driver/clang_cpp.c b/test/Driver/clang_cpp.c index 8638465e3a2fb..79b2f55131566 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 66853422dd1d6..c4ea430fdf31a 100644 --- a/test/Driver/clang_f_opts.c +++ b/test/Driver/clang_f_opts.c @@ -1,6 +1,6 @@ -// RUN: clang -### -S -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>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s -// RUN: clang -### -S -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>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s -// RUN: clang -### -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-SHORT-ENUMS %s +// RUN: %clang -### -S -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>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s +// RUN: %clang -### -S -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>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s +// RUN: %clang -### -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-SHORT-ENUMS %s // CHECK-OPTIONS1: -fblocks // CHECK-OPTIONS1: -fpascal-strings diff --git a/test/Driver/cxx-pth.cpp b/test/Driver/cxx-pth.cpp index e5b69c118fb37..e349691d423b7 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: %clang -x c++-header %s -### 2> %t.log // RUN: FileCheck -check-prefix EMIT -input-file %t.log %s // EMIT: "{{.*}}/clang{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp" // RUN: touch %t.h.gch -// RUN: clang -E -include %t.h %s -### 2> %t.log +// RUN: %clang -E -include %t.h %s -### 2> %t.log // RUN: FileCheck -check-prefix USE -input-file %t.log %s // USE: "{{.*}}/clang{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp" diff --git a/test/Driver/darwin-arm.c b/test/Driver/darwin-arm.c index 8b4c23d55724d..330918dd47d02 100644 --- a/test/Driver/darwin-arm.c +++ b/test/Driver/darwin-arm.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch arm -print-search-dirs | FileCheck %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -arch arm -print-search-dirs | FileCheck %s // Check that we look in the relative libexec directory. // CHECK: {{programs: =.*/../libexec:}} diff --git a/test/Driver/darwin-as.c b/test/Driver/darwin-as.c index 26e59a5ef6701..6410df0856377 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: %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 1f4335855b02d..7a3a378f89a03 100644 --- a/test/Driver/darwin-cc.c +++ b/test/Driver/darwin-cc.c @@ -1,4 +1,4 @@ -// 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: %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 diff --git a/test/Driver/darwin-debug-flags.c b/test/Driver/darwin-debug-flags.c new file mode 100644 index 0000000000000..7ce61378413ae --- /dev/null +++ b/test/Driver/darwin-debug-flags.c @@ -0,0 +1,11 @@ +// RUN: env RC_DEBUG_OPTIONS=1 %clang -ccc-host-triple i386-apple-darwin9 -g -Os %s -emit-llvm -S -o - | FileCheck %s +// <rdar://problem/7256886> + +// CHECK: !1 = metadata !{ +// CHECK: -cc1 +// CHECK: -triple i386-apple-darwin9 +// CHECK: -g +// CHECK: -Os +// CHECK: [ DW_TAG_compile_unit ] + +int x; diff --git a/test/Driver/darwin-ld.c b/test/Driver/darwin-ld.c index 04f35be09f1db..de751a67d9655 100644 --- a/test/Driver/darwin-ld.c +++ b/test/Driver/darwin-ld.c @@ -1,26 +1,26 @@ // 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: %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: %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: %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: %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: %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: %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: %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: %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 @@ -32,11 +32,11 @@ // // 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: %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: %clang -ccc-host-triple i386-apple-darwin9 -### -arch i386 -arch x86_64 -g %s 2> %t.log // RUN: grep dsymutil %t.log | count 0 diff --git a/test/Driver/darwin-version.c b/test/Driver/darwin-version.c index dd6905a589616..e69a8447c4a7c 100644 --- a/test/Driver/darwin-version.c +++ b/test/Driver/darwin-version.c @@ -1,4 +1,4 @@ -// RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 clang -ccc-host-triple i386-apple-darwin9 -E %s +// RUN: env MACOSX_DEPLOYMENT_TARGET=10.1 %clang -ccc-host-triple i386-apple-darwin9 -E %s #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010 #error Invalid version diff --git a/test/Driver/default-toolchain.c b/test/Driver/default-toolchain.c index 9cebdfe581fef..eeff7637b20eb 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: %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: %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 2eb3b1808ee8d..d7b954d586d7e 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{{.*}}" "-cc1" "-triple" "amd64-pc-dragonfly" diff --git a/test/Driver/emit-llvm.c b/test/Driver/emit-llvm.c index 27007c68c2fe4..3439b58d85d7a 100644 --- a/test/Driver/emit-llvm.c +++ b/test/Driver/emit-llvm.c @@ -1,3 +1,13 @@ -// RUN: not clang -ccc-host-triple i386-pc-linux-gnu -emit-llvm -o %t %s 2> %t.log +// RUN: not %clang -ccc-host-triple i386-pc-linux-gnu -emit-llvm -o %t %s 2> %t.log // RUN: grep 'unable to pass LLVM bit-code files to linker' %t.log +// Check that -O4 is only honored as the effective -O option. +// <rdar://problem/7046672> clang/loader problem + +// RUN: %clang -ccc-print-phases -c -O4 -O0 %s 2> %t +// RUN: FileCheck --check-prefix=O4_AND_O0 %s < %t + +// O4_AND_O0: 0: input, "{{.*}}", c +// O4_AND_O0: 1: preprocessor, {0}, cpp-output +// O4_AND_O0: 2: compiler, {1}, assembler +// O4_AND_O0: 3: assembler, {2}, object diff --git a/test/Driver/flags.c b/test/Driver/flags.c index bc50aae338700..6d80892da65a0 100644 --- a/test/Driver/flags.c +++ b/test/Driver/flags.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float %s 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float %s 2> %t.log // RUN: grep '"-no-implicit-float"' %t.log -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float -mno-soft-float %s 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float -mno-soft-float %s 2> %t.log // RUN: grep '"-no-implicit-float"' %t.log | count 0 -// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log // RUN: grep '"-no-implicit-float"' %t.log diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index 9700540f46bb4..3deee46f9a010 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t.log +// RUN: %clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t.log // RUN: cat %t.log // RUN: FileCheck -input-file %t.log %s diff --git a/test/Driver/hello.c b/test/Driver/hello.c index e1b6f1a0fd7a5..da628724d6d94 100644 --- a/test/Driver/hello.c +++ b/test/Driver/hello.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-echo -o %t %s 2> %t.log +// RUN: %clang -ccc-echo -o %t %s 2> %t.log // Make sure we used clang. // RUN: grep 'clang" -cc1 .*hello.c' %t.log diff --git a/test/Driver/immediate-options.c b/test/Driver/immediate-options.c index 923c30ea95cea..5a3ec872b4fe3 100644 --- a/test/Driver/immediate-options.c +++ b/test/Driver/immediate-options.c @@ -1,4 +1,4 @@ -// RUN: clang --help -// RUN: clang --help-hidden -// RUN: clang -dumpversion -// RUN: clang -print-search-dirs +// RUN: %clang --help +// RUN: %clang --help-hidden +// RUN: %clang -dumpversion +// RUN: %clang -print-search-dirs diff --git a/test/Driver/lto.c b/test/Driver/lto.c index 041b424618087..4543ffcd023e6 100644 --- a/test/Driver/lto.c +++ b/test/Driver/lto.c @@ -1,12 +1,12 @@ // -emit-llvm, -flto, and -O4 all cause a switch to llvm-bc object // files. -// RUN: clang -ccc-print-phases -c %s -flto 2> %t.log +// RUN: %clang -ccc-print-phases -c %s -flto 2> %t.log // RUN: grep '2: compiler, {1}, llvm-bc' %t.log -// RUN: clang -ccc-print-phases -c %s -O4 2> %t.log +// RUN: %clang -ccc-print-phases -c %s -O4 2> %t.log // RUN: grep '2: compiler, {1}, llvm-bc' %t.log // and -emit-llvm doesn't alter pipeline (unfortunately?). -// RUN: clang -ccc-print-phases %s -emit-llvm 2> %t.log +// RUN: %clang -ccc-print-phases %s -emit-llvm 2> %t.log // RUN: grep '0: input, ".*lto.c", c' %t.log // RUN: grep '1: preprocessor, {0}, cpp-output' %t.log // RUN: grep '2: compiler, {1}, llvm-bc' %t.log @@ -14,11 +14,11 @@ // llvm-bc and llvm-ll outputs need to match regular suffixes // (unfortunately). -// RUN: clang %s -emit-llvm -save-temps -### 2> %t.log +// RUN: %clang %s -emit-llvm -save-temps -### 2> %t.log // RUN: grep '"-o" ".*lto\.i" "-x" "c" ".*lto\.c"' %t.log // RUN: grep '"-o" ".*lto\.o" .*".*lto\.i"' %t.log // RUN: grep '".*a.out" .*".*lto\.o"' %t.log -// RUN: clang %s -emit-llvm -S -### 2> %t.log +// RUN: %clang %s -emit-llvm -S -### 2> %t.log // RUN: grep '"-o" ".*lto\.s" "-x" "c" ".*lto\.c"' %t.log diff --git a/test/Driver/openbsd.c b/test/Driver/openbsd.c index 97ba30bb69c23..6024461069a19 100644 --- a/test/Driver/openbsd.c +++ b/test/Driver/openbsd.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log +// RUN: %clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log // RUN: FileCheck -input-file %t.log %s // CHECK: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd" diff --git a/test/Driver/parsing.c b/test/Driver/parsing.c index 48b9d6a23f1fd..ca3a7f44fd8ea 100644 --- a/test/Driver/parsing.c +++ b/test/Driver/parsing.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-print-options input -Yunknown -m32 -arch ppc -djoined -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 2 3 2> %t +// RUN: %clang -ccc-print-options input -Yunknown -m32 -arch ppc -djoined -A separate -Ajoined -Wp,one,two -Xarch_joined AndSeparate -sectalign 1 2 3 2> %t // RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t // RUN: grep 'Option 1 - Name: "<input>", Values: {"input"}' %t // RUN: grep 'Option 2 - Name: "<unknown>", Values: {"-Yunknown"}' %t @@ -11,13 +11,13 @@ // RUN: grep 'Option 9 - Name: "-Xarch_", Values: {"joined", "AndSeparate"}' %t // RUN: grep 'Option 10 - Name: "-sectalign", Values: {"1", "2", "3"}' %t -// RUN: not clang -V 2> %t +// RUN: not %clang -V 2> %t // RUN: grep "error: argument to '-V' is missing (expected 1 value)" %t -// RUN: not clang -sectalign 1 2 2> %t +// RUN: not %clang -sectalign 1 2 2> %t // RUN: grep "error: argument to '-sectalign' is missing (expected 3 values)" %t // Verify that search continues after find the first option. -// RUN: clang -ccc-print-options -Wally 2> %t +// RUN: %clang -ccc-print-options -Wally 2> %t // RUN: grep 'Option 0 - Name: "-ccc-print-options", Values: {}' %t // RUN: grep 'Option 1 - Name: "-W", Values: {"ally"}' %t diff --git a/test/Driver/phases.c b/test/Driver/phases.c index d03bff9a77b1c..7fe529c51a930 100644 --- a/test/Driver/phases.c +++ b/test/Driver/phases.c @@ -1,5 +1,5 @@ // Basic compilation for various types of files. -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c %s -x objective-c %s -x c++ %s -x objective-c++ -x assembler %s -x assembler-with-cpp %s -x none %s 2>&1 | FileCheck -check-prefix=BASIC %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c %s -x objective-c %s -x c++ %s -x objective-c++ -x assembler %s -x assembler-with-cpp %s -x none %s 2>&1 | FileCheck -check-prefix=BASIC %s // BASIC: 0: input, "{{.*}}phases.c", c // BASIC: 1: preprocessor, {0}, cpp-output // BASIC: 2: compiler, {1}, assembler @@ -24,7 +24,7 @@ // BASIC: 21: linker, {3, 7, 11, 13, 16, 20}, image // Universal linked image. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=ULI %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=ULI %s // ULI: 0: input, "{{.*}}phases.c", c // ULI: 1: preprocessor, {0}, cpp-output // ULI: 2: compiler, {1}, assembler @@ -35,7 +35,7 @@ // ULI: 7: lipo, {5, 6}, image // Universal object file. -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=UOF %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x c %s -arch ppc -arch i386 2>&1 | FileCheck -check-prefix=UOF %s // UOF: 0: input, "{{.*}}phases.c", c // UOF: 1: preprocessor, {0}, cpp-output // UOF: 2: compiler, {1}, assembler @@ -45,33 +45,33 @@ // UOF: 6: lipo, {4, 5}, object // Arch defaulting -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH1 %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH1 %s // ARCH1: 2: bind-arch, "i386", {1}, object -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s -m32 -m64 2>&1 | FileCheck -check-prefix=ARCH2 %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c -x assembler %s -m32 -m64 2>&1 | FileCheck -check-prefix=ARCH2 %s // ARCH2: 2: bind-arch, "x86_64", {1}, object -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH3 %s +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s 2>&1 | FileCheck -check-prefix=ARCH3 %s // ARCH3: 2: bind-arch, "x86_64", {1}, object -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s -m64 -m32 2>&1 | FileCheck -check-prefix=ARCH4 %s +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -ccc-print-phases -c -x assembler %s -m64 -m32 2>&1 | FileCheck -check-prefix=ARCH4 %s // ARCH4: 2: bind-arch, "i386", {1}, object // Analyzer -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases --analyze %s 2>&1 | FileCheck -check-prefix=ANALYZE %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases --analyze %s 2>&1 | FileCheck -check-prefix=ANALYZE %s // ANALYZE: 0: input, "{{.*}}phases.c", c // ANALYZE: 1: preprocessor, {0}, cpp-output // ANALYZE: 2: analyzer, {1}, plist // Precompiler -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c-header %s 2>&1 | FileCheck -check-prefix=PCH %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -x c-header %s 2>&1 | FileCheck -check-prefix=PCH %s // PCH: 0: input, "{{.*}}phases.c", c-header // PCH: 1: preprocessor, {0}, c-header-cpp-output // PCH: 2: precompiler, {1}, precompiled-header // Darwin overrides the handling for .s // RUN: touch %t.s -// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN1 %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN1 %s // DARWIN1: 0: input, "{{.*}}.s", assembler // DARWIN1: 1: assembler, {0}, object -// RUN: clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN2 %s +// RUN: %clang -ccc-host-triple i386-apple-darwin9 -ccc-print-phases -c %t.s 2>&1 | FileCheck -check-prefix=DARWIN2 %s // DARWIN2: 0: input, "{{.*}}.s", assembler-with-cpp // DARWIN2: 1: preprocessor, {0}, assembler // DARWIN2: 2: assembler, {1}, object diff --git a/test/Driver/preprocessor.c b/test/Driver/preprocessor.c index 51b6fc57867eb..09c1f6c29cc65 100644 --- a/test/Driver/preprocessor.c +++ b/test/Driver/preprocessor.c @@ -1,4 +1,4 @@ -// RUN: clang -E -x c-header %s > %t +// RUN: %clang -E -x c-header %s > %t // RUN: grep 'B B' %t #define A B diff --git a/test/Driver/pth.c b/test/Driver/pth.c index 938675a900d84..9c47c5599376a 100644 --- a/test/Driver/pth.c +++ b/test/Driver/pth.c @@ -1,12 +1,12 @@ // Test transparent PTH support. -// RUN: clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log +// RUN: %clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log // RUN: FileCheck -check-prefix CHECK1 -input-file %t.log %s // CHECK1: "{{.*}}/clang{{.*}}" "-cc1" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c" // RUN: touch %t.h.pth -// RUN: clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log +// RUN: %clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log // RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s // CHECK2: "{{.*}}/clang{{.*}}" "-cc1" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c" diff --git a/test/Driver/qa_override.c b/test/Driver/qa_override.c index 822410659ead7..5f96976ee98e1 100644 --- a/test/Driver/qa_override.c +++ b/test/Driver/qa_override.c @@ -1,4 +1,4 @@ -// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " clang x -O2 b -O3 2>&1 | FileCheck %s +// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-ccc-print-options " %clang x -O2 b -O3 2>&1 | FileCheck %s // CHECK-NOT: ### // CHECK: Option 0 - Name: "-ccc-print-options", Values: {} // CHECK-NEXT: Option 1 - Name: "<input>", Values: {"x"} diff --git a/test/Driver/redzone.c b/test/Driver/redzone.c index 86f412fb46900..9f117d0489bd8 100644 --- a/test/Driver/redzone.c +++ b/test/Driver/redzone.c @@ -1,6 +1,6 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -mno-red-zone %s -S -emit-llvm -o %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -mno-red-zone %s -S -emit-llvm -o %t.log // RUN: grep 'noredzone' %t.log -// RUN: clang -ccc-host-triple i386-unknown-unknown -mred-zone %s -S -emit-llvm -o %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -mred-zone %s -S -emit-llvm -o %t.log // RUN: grep -v 'noredzone' %t.log int foo() { return 42; } diff --git a/test/Driver/std.c b/test/Driver/std.c index 01a5f7ccec255..c82e9f15c7dae 100644 --- a/test/Driver/std.c +++ b/test/Driver/std.c @@ -1,8 +1,8 @@ -// RUN: clang -std=c99 -trigraphs -std=gnu99 %s -E -o - | FileCheck -check-prefix=OVERRIDE %s +// RUN: %clang -std=c99 -trigraphs -std=gnu99 %s -E -o - | FileCheck -check-prefix=OVERRIDE %s // OVERRIDE: ??(??) -// RUN: clang -ansi %s -E -o - | FileCheck -check-prefix=ANSI %s +// RUN: %clang -ansi %s -E -o - | FileCheck -check-prefix=ANSI %s // ANSI: [] -// RUN: clang -std=gnu99 -trigraphs %s -E -o - | FileCheck -check-prefix=EXPLICIT %s +// RUN: %clang -std=gnu99 -trigraphs %s -E -o - | FileCheck -check-prefix=EXPLICIT %s // EXPLICIT: [] ??(??) diff --git a/test/Driver/unknown-gcc-arch.c b/test/Driver/unknown-gcc-arch.c index e8b653fbceab0..7018bf839d023 100644 --- a/test/Driver/unknown-gcc-arch.c +++ b/test/Driver/unknown-gcc-arch.c @@ -1,8 +1,8 @@ -// RUN: clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### 2> %t.log +// RUN: %clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### 2> %t.log // RUN: grep '.*gcc.*"-m64"' %t.log -// RUN: clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### -m32 2> %t.log +// RUN: %clang -ccc-host-triple x86_64-unknown-unknown -c -x assembler %s -### -m32 2> %t.log // RUN: grep '.*gcc.*"-m32"' %t.log -// RUN: clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### 2> %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### 2> %t.log // RUN: grep '.*gcc.*"-m32"' %t.log -// RUN: clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### -m64 2> %t.log +// RUN: %clang -ccc-host-triple i386-unknown-unknown -c -x assembler %s -### -m64 2> %t.log // RUN: grep '.*gcc.*"-m64"' %t.log diff --git a/test/Driver/x86_features.c b/test/Driver/x86_features.c index d0473b38bb1e0..9dbdd0ae90b4b 100644 --- a/test/Driver/x86_features.c +++ b/test/Driver/x86_features.c @@ -1,3 +1,3 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -### -S %s -msse -msse4 -mno-sse -mno-mmx -msse 2> %t +// RUN: %clang -ccc-host-triple i386-unknown-unknown -### -S %s -msse -msse4 -mno-sse -mno-mmx -msse 2> %t // RUN: grep '"-target-feature" "+sse" "-target-feature" "+sse4" "-target-feature" "-sse" "-target-feature" "-mmx" "-target-feature" "+sse"' %t |
