From 5618e98f3345d87076550a56ebe571bf85e6d34e Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 15 Dec 2009 22:01:24 +0000 Subject: [PATCH] Update tests to use %clang instead of 'clang', and forcibly disable use of ' clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460 --- .../basic.namespace/namespace.udecl/p10.cpp | 2 +- clang/test/CodeGen/2009-10-20-GlobalDebug.c | 2 +- clang/test/CodeGen/always_inline.c | 4 +-- clang/test/CodeGen/bitfield-promote.c | 2 +- clang/test/CodeGen/call-knr-indirect.c | 2 +- clang/test/CodeGen/illegal-UTF8.m | 2 +- clang/test/CodeGen/inline.c | 6 ++-- clang/test/CodeGen/lineno-dbginfo.c | 2 +- clang/test/CodeGen/no-common.c | 4 +-- clang/test/CodeGenCXX/constructor-convert.cpp | 2 +- clang/test/CodeGenObjC/attr-strong.c | 2 +- clang/test/Coverage/targets.c | 2 +- clang/test/Driver/Xarch.c | 6 ++-- clang/test/Driver/analyze.c | 2 +- clang/test/Driver/arm-darwin-builtin.c | 2 +- clang/test/Driver/ast.c | 4 +-- clang/test/Driver/bindings.c | 30 +++++++++---------- clang/test/Driver/ccc-add-args.c | 2 +- clang/test/Driver/clang-translation.c | 12 ++++---- clang/test/Driver/clang_cpp.c | 2 +- clang/test/Driver/clang_f_opts.c | 6 ++-- clang/test/Driver/cxx-pth.cpp | 4 +-- clang/test/Driver/darwin-arm.c | 2 +- clang/test/Driver/darwin-as.c | 4 +-- clang/test/Driver/darwin-cc.c | 2 +- clang/test/Driver/darwin-ld.c | 20 ++++++------- clang/test/Driver/darwin-version.c | 2 +- clang/test/Driver/default-toolchain.c | 6 ++-- clang/test/Driver/dragonfly.c | 2 +- clang/test/Driver/emit-llvm.c | 2 +- clang/test/Driver/flags.c | 6 ++-- clang/test/Driver/freebsd.c | 2 +- clang/test/Driver/hello.c | 2 +- clang/test/Driver/immediate-options.c | 8 ++--- clang/test/Driver/lto.c | 10 +++---- clang/test/Driver/openbsd.c | 2 +- clang/test/Driver/parsing.c | 8 ++--- clang/test/Driver/phases.c | 22 +++++++------- clang/test/Driver/preprocessor.c | 2 +- clang/test/Driver/pth.c | 4 +-- clang/test/Driver/qa_override.c | 2 +- clang/test/Driver/redzone.c | 4 +-- clang/test/Driver/std.c | 6 ++-- clang/test/Driver/unknown-gcc-arch.c | 8 ++--- clang/test/Driver/x86_features.c | 2 +- clang/test/Frontend/ast-codegen.c | 4 +-- clang/test/Frontend/ast-main.c | 6 ++-- clang/test/Frontend/cpp-output.c | 4 +-- clang/test/Frontend/darwin-version.c | 18 +++++------ clang/test/Frontend/dependency-gen.c | 4 +-- clang/test/Index/cindex-from-source.m | 2 +- clang/test/Lexer/comment-escape.c | 2 +- clang/test/Lexer/counter.c | 2 +- clang/test/Lexer/has_feature_exceptions.cpp | 4 +-- clang/test/Lexer/has_feature_rtti.cpp | 4 +-- clang/test/PCH/pr4489.c | 4 +-- clang/test/Preprocessor/dependencies-and-pp.c | 4 +-- clang/test/Preprocessor/dump-options.c | 4 +-- clang/test/Preprocessor/header_lookup1.c | 2 +- clang/test/Preprocessor/macro-multiline.c | 2 +- clang/test/Preprocessor/pic.c | 6 ++-- clang/test/Preprocessor/pragma_sysheader.c | 2 +- clang/test/Preprocessor/print_line_count.c | 2 +- clang/test/Preprocessor/x86_target_features.c | 6 ++-- clang/test/Sema/attr-malloc.c | 4 +-- clang/test/Sema/i-c-e.c | 2 +- clang/test/Sema/return.c | 2 +- clang/test/Sema/shift.c | 2 +- clang/test/Sema/surpress-deprecated.c | 2 +- clang/test/Sema/transparent-union.c | 2 +- clang/test/Sema/warn-missing-prototypes.c | 2 +- clang/test/Sema/warn-unused-parameters.c | 2 +- clang/test/Sema/wchar.c | 4 +-- clang/test/Sema/x86-intrinsics-headers.c | 6 ++-- clang/test/SemaCXX/warn-unused-variables.cpp | 2 +- clang/test/SemaTemplate/example-dynarray.cpp | 2 +- clang/test/lit.cfg | 11 ++++++- 77 files changed, 182 insertions(+), 173 deletions(-) diff --git a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp index 00d109e67516..1aa163a8d8d7 100644 --- a/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp +++ b/clang/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -verify %s +// RUN: %clang -fsyntax-only -verify %s namespace test0 { namespace ns0 { diff --git a/clang/test/CodeGen/2009-10-20-GlobalDebug.c b/clang/test/CodeGen/2009-10-20-GlobalDebug.c index fddc76c14da8..f19ceb1e73c1 100644 --- a/clang/test/CodeGen/2009-10-20-GlobalDebug.c +++ b/clang/test/CodeGen/2009-10-20-GlobalDebug.c @@ -1,4 +1,4 @@ -// RUN: clang -ccc-host-triple i386-apple-darwin10 -S -g -dA %s -o - | FileCheck %s +// RUN: %clang -ccc-host-triple i386-apple-darwin10 -S -g -dA %s -o - | FileCheck %s int global; // CHECK: asciz "global" ## DW_AT_name int main() { return 0;} diff --git a/clang/test/CodeGen/always_inline.c b/clang/test/CodeGen/always_inline.c index d995ea11be09..c91fd43f2761 100644 --- a/clang/test/CodeGen/always_inline.c +++ b/clang/test/CodeGen/always_inline.c @@ -1,7 +1,7 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s // RUN: not grep '@f0' %t // RUN: not grep 'call ' %t -// RUN: clang -mllvm -disable-llvm-optzns -emit-llvm -S -o %t %s +// RUN: %clang -mllvm -disable-llvm-optzns -emit-llvm -S -o %t %s // RUN: grep '@f0' %t | count 2 //static int f0() { diff --git a/clang/test/CodeGen/bitfield-promote.c b/clang/test/CodeGen/bitfield-promote.c index 1290a1ecd33b..4c3292c48feb 100644 --- a/clang/test/CodeGen/bitfield-promote.c +++ b/clang/test/CodeGen/bitfield-promote.c @@ -1,4 +1,4 @@ -// RUN: clang -O3 -emit-llvm -S -o %t %s +// RUN: %clang -O3 -emit-llvm -S -o %t %s // RUN: grep 'ret i64 4294967292' %t | count 2 // RUN: grep 'ret i64 -4' %t | count 1 diff --git a/clang/test/CodeGen/call-knr-indirect.c b/clang/test/CodeGen/call-knr-indirect.c index 17be015bffb1..2e923b303cd0 100644 --- a/clang/test/CodeGen/call-knr-indirect.c +++ b/clang/test/CodeGen/call-knr-indirect.c @@ -1,4 +1,4 @@ -// RUN: clang %s -O0 -emit-llvm -S -o - | grep 'call.*rb_define_global_function' +// RUN: %clang %s -O0 -emit-llvm -S -o - | grep 'call.*rb_define_global_function' // This should call rb_define_global_function, not rb_f_chop. void rb_define_global_function (const char*,void(*)(),int); diff --git a/clang/test/CodeGen/illegal-UTF8.m b/clang/test/CodeGen/illegal-UTF8.m index a9d5a37ac757..871e6e5956a8 100644 --- a/clang/test/CodeGen/illegal-UTF8.m +++ b/clang/test/CodeGen/illegal-UTF8.m @@ -1,4 +1,4 @@ -// RUN: clang %s -S -m64 -o - +// RUN: %clang %s -S -m64 -o - @class NSString; diff --git a/clang/test/CodeGen/inline.c b/clang/test/CodeGen/inline.c index 76d90eda2100..a17b06992968 100644 --- a/clang/test/CodeGen/inline.c +++ b/clang/test/CodeGen/inline.c @@ -1,5 +1,5 @@ // RUN: echo "GNU89 tests:" -// RUN: clang %s -emit-llvm -S -o %t -std=gnu89 +// RUN: %clang %s -emit-llvm -S -o %t -std=gnu89 // RUN: grep "define available_externally i32 @ei()" %t // RUN: grep "define i32 @foo()" %t // RUN: grep "define i32 @bar()" %t @@ -14,7 +14,7 @@ // RUN: grep "define available_externally i32 @test5" %t // RUN: echo "\nC99 tests:" -// RUN: clang %s -emit-llvm -S -o %t -std=c99 +// RUN: %clang %s -emit-llvm -S -o %t -std=c99 // RUN: grep "define i32 @ei()" %t // RUN: grep "define available_externally i32 @foo()" %t // RUN: grep "define i32 @bar()" %t @@ -29,7 +29,7 @@ // RUN: grep "define available_externally i32 @test5" %t // RUN: echo "\nC++ tests:" -// RUN: clang %s -emit-llvm -S -o %t -std=c++98 +// RUN: %clang %s -emit-llvm -S -o %t -std=c++98 // RUN: grep "define linkonce_odr i32 @_Z2eiv()" %t // RUN: grep "define linkonce_odr i32 @_Z3foov()" %t // RUN: grep "define i32 @_Z3barv()" %t diff --git a/clang/test/CodeGen/lineno-dbginfo.c b/clang/test/CodeGen/lineno-dbginfo.c index b78dd21d72b3..c5c350f7009e 100644 --- a/clang/test/CodeGen/lineno-dbginfo.c +++ b/clang/test/CodeGen/lineno-dbginfo.c @@ -1,5 +1,5 @@ // RUN: echo "#include " > %t.h -// RUN: clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll +// RUN: %clang -S -save-temps -g -include %t.h %s -emit-llvm -o %t.ll // RUN: grep "i32 5" %t.ll // RUN: rm -f lineno-dbginfo.i // outer is at line number 5. diff --git a/clang/test/CodeGen/no-common.c b/clang/test/CodeGen/no-common.c index 64e37d78f964..03a5bb064c31 100644 --- a/clang/test/CodeGen/no-common.c +++ b/clang/test/CodeGen/no-common.c @@ -1,6 +1,6 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s // RUN: grep '@x = common global' %t -// RUN: clang -fno-common -emit-llvm -S -o %t %s +// RUN: %clang -fno-common -emit-llvm -S -o %t %s // RUN: grep '@x = global' %t int x; diff --git a/clang/test/CodeGenCXX/constructor-convert.cpp b/clang/test/CodeGenCXX/constructor-convert.cpp index 6fa6d556dc50..7de07724bf17 100644 --- a/clang/test/CodeGenCXX/constructor-convert.cpp +++ b/clang/test/CodeGenCXX/constructor-convert.cpp @@ -1,4 +1,4 @@ -// RUN: clang -emit-llvm -S -o - %s +// RUN: %clang -emit-llvm -S -o - %s // PR5775 class Twine { diff --git a/clang/test/CodeGenObjC/attr-strong.c b/clang/test/CodeGenObjC/attr-strong.c index ca8333449435..f1474bc93eb5 100644 --- a/clang/test/CodeGenObjC/attr-strong.c +++ b/clang/test/CodeGenObjC/attr-strong.c @@ -1,4 +1,4 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s struct s0 { void *a; diff --git a/clang/test/Coverage/targets.c b/clang/test/Coverage/targets.c index 17d96d88c1b1..c9f6f8d88d59 100644 --- a/clang/test/Coverage/targets.c +++ b/clang/test/Coverage/targets.c @@ -18,5 +18,5 @@ // RUN: %clang_cc1 -g -triple x86_64-unknown-unknown -emit-llvm -o %t %s // clang 1.0 fails to compile Python 2.6 -// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4 +// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4 diff --git a/clang/test/Driver/Xarch.c b/clang/test/Driver/Xarch.c index ba6f5c63d4d4..b35bf6c92dff 100644 --- a/clang/test/Driver/Xarch.c +++ b/clang/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/clang/test/Driver/analyze.c b/clang/test/Driver/analyze.c index bdbfbbfd88dd..2f850bc73dde 100644 --- a/clang/test/Driver/analyze.c +++ b/clang/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/clang/test/Driver/arm-darwin-builtin.c b/clang/test/Driver/arm-darwin-builtin.c index 63cf34332ae1..9d4cee0f05e3 100644 --- a/clang/test/Driver/arm-darwin-builtin.c +++ b/clang/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/clang/test/Driver/ast.c b/clang/test/Driver/ast.c index fd38c108b051..6e5857fba5e3 100644 --- a/clang/test/Driver/ast.c +++ b/clang/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/clang/test/Driver/bindings.c b/clang/test/Driver/bindings.c index 41d6a7ced175..2271ab5c6459 100644 --- a/clang/test/Driver/bindings.c +++ b/clang/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/clang/test/Driver/ccc-add-args.c b/clang/test/Driver/ccc-add-args.c index afd9bd6f7650..d9a16cbfb460 100644 --- a/clang/test/Driver/ccc-add-args.c +++ b/clang/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/clang/test/Driver/clang-translation.c b/clang/test/Driver/clang-translation.c index 762ebb7944b2..8c54c25d49aa 100644 --- a/clang/test/Driver/clang-translation.c +++ b/clang/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: %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: %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 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/clang/test/Driver/clang_cpp.c b/clang/test/Driver/clang_cpp.c index 8638465e3a2f..79b2f5513156 100644 --- a/clang/test/Driver/clang_cpp.c +++ b/clang/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/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index 66853422dd1d..c4ea430fdf31 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/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/clang/test/Driver/cxx-pth.cpp b/clang/test/Driver/cxx-pth.cpp index e5b69c118fb3..e349691d423b 100644 --- a/clang/test/Driver/cxx-pth.cpp +++ b/clang/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/clang/test/Driver/darwin-arm.c b/clang/test/Driver/darwin-arm.c index 8b4c23d55724..330918dd47d0 100644 --- a/clang/test/Driver/darwin-arm.c +++ b/clang/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/clang/test/Driver/darwin-as.c b/clang/test/Driver/darwin-as.c index 26e59a5ef670..6410df085637 100644 --- a/clang/test/Driver/darwin-as.c +++ b/clang/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/clang/test/Driver/darwin-cc.c b/clang/test/Driver/darwin-cc.c index 1f4335855b02..7a3a378f89a0 100644 --- a/clang/test/Driver/darwin-cc.c +++ b/clang/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/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c index 04f35be09f1d..de751a67d965 100644 --- a/clang/test/Driver/darwin-ld.c +++ b/clang/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/clang/test/Driver/darwin-version.c b/clang/test/Driver/darwin-version.c index dd6905a58961..e69a8447c4a7 100644 --- a/clang/test/Driver/darwin-version.c +++ b/clang/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/clang/test/Driver/default-toolchain.c b/clang/test/Driver/default-toolchain.c index 9cebdfe581fe..eeff7637b20e 100644 --- a/clang/test/Driver/default-toolchain.c +++ b/clang/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/clang/test/Driver/dragonfly.c b/clang/test/Driver/dragonfly.c index 2eb3b1808ee8..d7b954d586d7 100644 --- a/clang/test/Driver/dragonfly.c +++ b/clang/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/clang/test/Driver/emit-llvm.c b/clang/test/Driver/emit-llvm.c index 27007c68c2fe..e0cc0b5dc219 100644 --- a/clang/test/Driver/emit-llvm.c +++ b/clang/test/Driver/emit-llvm.c @@ -1,3 +1,3 @@ -// 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 diff --git a/clang/test/Driver/flags.c b/clang/test/Driver/flags.c index bc50aae33870..6d80892da65a 100644 --- a/clang/test/Driver/flags.c +++ b/clang/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/clang/test/Driver/freebsd.c b/clang/test/Driver/freebsd.c index 9700540f46bb..3deee46f9a01 100644 --- a/clang/test/Driver/freebsd.c +++ b/clang/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/clang/test/Driver/hello.c b/clang/test/Driver/hello.c index e1b6f1a0fd7a..da628724d6d9 100644 --- a/clang/test/Driver/hello.c +++ b/clang/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/clang/test/Driver/immediate-options.c b/clang/test/Driver/immediate-options.c index 923c30ea95ce..5a3ec872b4fe 100644 --- a/clang/test/Driver/immediate-options.c +++ b/clang/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/clang/test/Driver/lto.c b/clang/test/Driver/lto.c index 041b42461808..4543ffcd023e 100644 --- a/clang/test/Driver/lto.c +++ b/clang/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/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c index 97ba30bb69c2..6024461069a1 100644 --- a/clang/test/Driver/openbsd.c +++ b/clang/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/clang/test/Driver/parsing.c b/clang/test/Driver/parsing.c index 48b9d6a23f1f..ca3a7f44fd8e 100644 --- a/clang/test/Driver/parsing.c +++ b/clang/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: "", Values: {"input"}' %t // RUN: grep 'Option 2 - Name: "", 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/clang/test/Driver/phases.c b/clang/test/Driver/phases.c index d03bff9a77b1..7fe529c51a93 100644 --- a/clang/test/Driver/phases.c +++ b/clang/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/clang/test/Driver/preprocessor.c b/clang/test/Driver/preprocessor.c index 51b6fc57867e..09c1f6c29cc6 100644 --- a/clang/test/Driver/preprocessor.c +++ b/clang/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/clang/test/Driver/pth.c b/clang/test/Driver/pth.c index 938675a900d8..9c47c5599376 100644 --- a/clang/test/Driver/pth.c +++ b/clang/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/clang/test/Driver/qa_override.c b/clang/test/Driver/qa_override.c index 822410659ead..5f96976ee98e 100644 --- a/clang/test/Driver/qa_override.c +++ b/clang/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: "", Values: {"x"} diff --git a/clang/test/Driver/redzone.c b/clang/test/Driver/redzone.c index 86f412fb4690..9f117d0489bd 100644 --- a/clang/test/Driver/redzone.c +++ b/clang/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/clang/test/Driver/std.c b/clang/test/Driver/std.c index 01a5f7ccec25..c82e9f15c7da 100644 --- a/clang/test/Driver/std.c +++ b/clang/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/clang/test/Driver/unknown-gcc-arch.c b/clang/test/Driver/unknown-gcc-arch.c index e8b653fbceab..7018bf839d02 100644 --- a/clang/test/Driver/unknown-gcc-arch.c +++ b/clang/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/clang/test/Driver/x86_features.c b/clang/test/Driver/x86_features.c index d0473b38bb1e..9dbdd0ae90b4 100644 --- a/clang/test/Driver/x86_features.c +++ b/clang/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 diff --git a/clang/test/Frontend/ast-codegen.c b/clang/test/Frontend/ast-codegen.c index bd8a20adb69b..b5b2157e21ae 100644 --- a/clang/test/Frontend/ast-codegen.c +++ b/clang/test/Frontend/ast-codegen.c @@ -1,5 +1,5 @@ -// RUN: clang -emit-ast -o %t.ast %s -// RUN: clang -emit-llvm -S -o - %t.ast | FileCheck %s +// RUN: %clang -emit-ast -o %t.ast %s +// RUN: %clang -emit-llvm -S -o - %t.ast | FileCheck %s // CHECK: module asm "foo" __asm__("foo"); diff --git a/clang/test/Frontend/ast-main.c b/clang/test/Frontend/ast-main.c index ef072b92f9c1..43237a12ef59 100644 --- a/clang/test/Frontend/ast-main.c +++ b/clang/test/Frontend/ast-main.c @@ -1,6 +1,6 @@ -// RUN: clang -emit-llvm -S -o %t1.ll -x c - < %s -// RUN: clang -emit-ast -o %t.ast %s -// RUN: clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast +// RUN: %clang -emit-llvm -S -o %t1.ll -x c - < %s +// RUN: %clang -emit-ast -o %t.ast %s +// RUN: %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast // RUN: diff %t1.ll %t2.ll int main() { diff --git a/clang/test/Frontend/cpp-output.c b/clang/test/Frontend/cpp-output.c index 9a6fc9b21425..e44095b59902 100644 --- a/clang/test/Frontend/cpp-output.c +++ b/clang/test/Frontend/cpp-output.c @@ -1,7 +1,7 @@ -// RUN: clang -E -o %t -C %s +// RUN: %clang -E -o %t -C %s // RUN: grep '^int x; // comment' %t // RUN: grep '^x x' %t -// RUN: clang -E -o %t -CC %s +// RUN: %clang -E -o %t -CC %s // RUN: grep '^int x; // comment' %t // RUN: grep '^x /\* comment \*/ x /\* comment \*/' %t diff --git a/clang/test/Frontend/darwin-version.c b/clang/test/Frontend/darwin-version.c index 4896aecdfae5..1c866ee09601 100644 --- a/clang/test/Frontend/darwin-version.c +++ b/clang/test/Frontend/darwin-version.c @@ -1,22 +1,22 @@ -// RUN: clang -ccc-host-triple armv6-apple-darwin9 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0 -// RUN: clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.0 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | count 0 -// RUN: clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.2 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple armv6-apple-darwin9 -miphoneos-version-min=2.2 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin8 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin8 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin10 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin10 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.4 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.4 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | count 0 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.5 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.5 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1 -// RUN: clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.6 -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i686-apple-darwin9 -mmacosx-version-min=10.6 -dM -E -o %t %s // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1 diff --git a/clang/test/Frontend/dependency-gen.c b/clang/test/Frontend/dependency-gen.c index 9185921407da..c85d60be73f8 100644 --- a/clang/test/Frontend/dependency-gen.c +++ b/clang/test/Frontend/dependency-gen.c @@ -1,8 +1,8 @@ // rdar://6533411 -// RUN: clang -MD -MF %t.d -S -x c -o %t.o %s +// RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d -// RUN: clang -S -M -x c %s -o %t.d +// RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d diff --git a/clang/test/Index/cindex-from-source.m b/clang/test/Index/cindex-from-source.m index 8d6a1de4bbdc..e775bb71e11e 100644 --- a/clang/test/Index/cindex-from-source.m +++ b/clang/test/Index/cindex-from-source.m @@ -1,5 +1,5 @@ // RUN: echo 'typedef int t0;' > %t.pfx.h -// RUN: clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch +// RUN: %clang -x objective-c-header %t.pfx.h -o %t.pfx.h.gch // RUN: c-index-test -test-load-source local %s -include %t.pfx.h > %t // RUN: FileCheck %s < %t // CHECK: cindex-from-source.m:{{.*}}:{{.*}}: StructDecl=s0:{{.*}}:{{.*}} [Context=cindex-from-source.m] diff --git a/clang/test/Lexer/comment-escape.c b/clang/test/Lexer/comment-escape.c index c46145715843..191e65441dd4 100644 --- a/clang/test/Lexer/comment-escape.c +++ b/clang/test/Lexer/comment-escape.c @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only %s +// RUN: %clang -fsyntax-only %s // rdar://6757323 // foo \ diff --git a/clang/test/Lexer/counter.c b/clang/test/Lexer/counter.c index 044570f88869..21737300228d 100644 --- a/clang/test/Lexer/counter.c +++ b/clang/test/Lexer/counter.c @@ -1,5 +1,5 @@ // __COUNTER__ support: rdar://4329310 -// RUN: clang -E %s > %t +// RUN: %clang -E %s > %t #define PASTE2(x,y) x##y #define PASTE1(x,y) PASTE2(x,y) diff --git a/clang/test/Lexer/has_feature_exceptions.cpp b/clang/test/Lexer/has_feature_exceptions.cpp index 231a6c56a45b..cfd1efbf8464 100644 --- a/clang/test/Lexer/has_feature_exceptions.cpp +++ b/clang/test/Lexer/has_feature_exceptions.cpp @@ -1,5 +1,5 @@ -// RUN: clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s -// RUN: clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s +// RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s +// RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s #if __has_feature(cxx_exceptions) int foo(); diff --git a/clang/test/Lexer/has_feature_rtti.cpp b/clang/test/Lexer/has_feature_rtti.cpp index cc01f61cba67..690906c292f2 100644 --- a/clang/test/Lexer/has_feature_rtti.cpp +++ b/clang/test/Lexer/has_feature_rtti.cpp @@ -1,5 +1,5 @@ -// RUN: clang -E -frtti %s -o - | FileCheck --check-prefix=CHECK-RTTI %s -// RUN: clang -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s +// RUN: %clang -E -frtti %s -o - | FileCheck --check-prefix=CHECK-RTTI %s +// RUN: %clang -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s #if __has_feature(cxx_rtti) int foo(); diff --git a/clang/test/PCH/pr4489.c b/clang/test/PCH/pr4489.c index aaf5aac749e5..1d8be2d76cc5 100644 --- a/clang/test/PCH/pr4489.c +++ b/clang/test/PCH/pr4489.c @@ -1,6 +1,6 @@ -// RUN: clang -x c-header -o %t.pch %s +// RUN: %clang -x c-header -o %t.pch %s // RUN: echo > %t.empty.c -// RUN: clang -include %t -x c %t.empty.c -emit-llvm -S -o - +// RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o - // PR 4489: Crash with PCH // PR 4492: Crash with PCH (round two) // PR 4509: Crash with PCH (round three) diff --git a/clang/test/Preprocessor/dependencies-and-pp.c b/clang/test/Preprocessor/dependencies-and-pp.c index 5359d0af4d7a..d7bf4df51c81 100644 --- a/clang/test/Preprocessor/dependencies-and-pp.c +++ b/clang/test/Preprocessor/dependencies-and-pp.c @@ -1,5 +1,5 @@ -// RUN: clang -E -o %t.1 %s -// RUN: clang -E -MD -MF %t.d -MT foo -o %t.2 %s +// RUN: %clang -E -o %t.1 %s +// RUN: %clang -E -MD -MF %t.d -MT foo -o %t.2 %s // RUN: diff %t.1 %t.2 // RUN: grep "foo:" %t.d // RUN: grep "dependencies-and-pp.c" %t.d diff --git a/clang/test/Preprocessor/dump-options.c b/clang/test/Preprocessor/dump-options.c index 8302f1a32615..a329bd46ac1d 100644 --- a/clang/test/Preprocessor/dump-options.c +++ b/clang/test/Preprocessor/dump-options.c @@ -1,3 +1,3 @@ -// RUN: clang %s -E -dD | grep __INTMAX_MAX__ -// RUN: clang %s -E -dM | grep __INTMAX_MAX__ +// RUN: %clang %s -E -dD | grep __INTMAX_MAX__ +// RUN: %clang %s -E -dM | grep __INTMAX_MAX__ diff --git a/clang/test/Preprocessor/header_lookup1.c b/clang/test/Preprocessor/header_lookup1.c index 961e55161418..f93d0afe331e 100644 --- a/clang/test/Preprocessor/header_lookup1.c +++ b/clang/test/Preprocessor/header_lookup1.c @@ -1,2 +1,2 @@ -// RUN: clang -fno-ms-extensions -I /usr/include %s -E | grep 'stdio.h.*3.*4' +// RUN: %clang -fno-ms-extensions -I /usr/include %s -E | grep 'stdio.h.*3.*4' #include diff --git a/clang/test/Preprocessor/macro-multiline.c b/clang/test/Preprocessor/macro-multiline.c index 9f24ae8e5563..df7c40a954d6 100644 --- a/clang/test/Preprocessor/macro-multiline.c +++ b/clang/test/Preprocessor/macro-multiline.c @@ -1,4 +1,4 @@ -// RUN: clang -E %s "-DX=A +// RUN: %clang -E %s "-DX=A // RUN: THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" > %t // RUN: grep "GOOD: A" %t // RUN: not grep THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT %t diff --git a/clang/test/Preprocessor/pic.c b/clang/test/Preprocessor/pic.c index b8068faac8c0..886beb715953 100644 --- a/clang/test/Preprocessor/pic.c +++ b/clang/test/Preprocessor/pic.c @@ -1,9 +1,9 @@ -// RUN: clang -ccc-host-triple i386-unknown-unknown -static -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -static -dM -E -o %t %s // RUN: grep '#define __PIC__' %t | count 0 // RUN: grep '#define __pic__' %t | count 0 -// RUN: clang -ccc-host-triple i386-unknown-unknown -fpic -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -fpic -dM -E -o %t %s // RUN: grep '#define __PIC__ 1' %t | count 1 // RUN: grep '#define __pic__ 1' %t | count 1 -// RUN: clang -ccc-host-triple i386-unknown-unknown -fPIC -dM -E -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -fPIC -dM -E -o %t %s // RUN: grep '#define __PIC__ 2' %t | count 1 // RUN: grep '#define __pic__ 2' %t | count 1 diff --git a/clang/test/Preprocessor/pragma_sysheader.c b/clang/test/Preprocessor/pragma_sysheader.c index 49082b8c09d1..cf2843bffdea 100644 --- a/clang/test/Preprocessor/pragma_sysheader.c +++ b/clang/test/Preprocessor/pragma_sysheader.c @@ -1,3 +1,3 @@ -// RUN: clang -verify -pedantic %s -fsyntax-only +// RUN: %clang -verify -pedantic %s -fsyntax-only // rdar://6899937 #include "pragma_sysheader.h" diff --git a/clang/test/Preprocessor/print_line_count.c b/clang/test/Preprocessor/print_line_count.c index 2eb62df48688..6a02b0eede00 100644 --- a/clang/test/Preprocessor/print_line_count.c +++ b/clang/test/Preprocessor/print_line_count.c @@ -1,4 +1,4 @@ -/* RUN: clang -E -C -P %s | wc -l | grep 4 +/* RUN: %clang -E -C -P %s | wc -l | grep 4 PR2741 comment */ y diff --git a/clang/test/Preprocessor/x86_target_features.c b/clang/test/Preprocessor/x86_target_features.c index f8574e25d474..f39c2208a4c1 100644 --- a/clang/test/Preprocessor/x86_target_features.c +++ b/clang/test/Preprocessor/x86_target_features.c @@ -1,6 +1,6 @@ // FIXME: Use -triple, not -ccc-host-triple. -// RUN: clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -x c -E -dM -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -x c -E -dM -o %t %s // RUN: grep '#define __SSE2_MATH__ 1' %t // RUN: grep '#define __SSE2__ 1' %t // RUN: grep '#define __SSE3__ 1' %t @@ -10,7 +10,7 @@ // RUN: grep '#define __SSE__ 1' %t // RUN: grep '#define __SSSE3__ 1' %t -// RUN: clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -mno-sse2 -x c -E -dM -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -march=core2 -msse4 -mno-sse2 -x c -E -dM -o %t %s // RUN: grep '#define __SSE2_MATH__ 1' %t | count 0 // RUN: grep '#define __SSE2__ 1' %t | count 0 // RUN: grep '#define __SSE3__ 1' %t | count 0 @@ -20,7 +20,7 @@ // RUN: grep '#define __SSE__ 1' %t // RUN: grep '#define __SSSE3__ 1' %t | count 0 -// RUN: clang -ccc-host-triple i386-unknown-unknown -march=pentium-m -x c -E -dM -o %t %s +// RUN: %clang -ccc-host-triple i386-unknown-unknown -march=pentium-m -x c -E -dM -o %t %s // RUN: grep '#define __SSE2_MATH__ 1' %t // RUN: grep '#define __SSE2__ 1' %t // RUN: grep '#define __SSE3__ 1' %t | count 0 diff --git a/clang/test/Sema/attr-malloc.c b/clang/test/Sema/attr-malloc.c index 6483ffc4c1a6..9970b9de4f95 100644 --- a/clang/test/Sema/attr-malloc.c +++ b/clang/test/Sema/attr-malloc.c @@ -1,5 +1,5 @@ -// RUN: clang -Xclang -verify -fsyntax-only %s -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -Xclang -verify -fsyntax-only %s +// RUN: %clang -emit-llvm -S -o %t %s #include diff --git a/clang/test/Sema/i-c-e.c b/clang/test/Sema/i-c-e.c index 6e14833166d8..c561fe01c6ee 100644 --- a/clang/test/Sema/i-c-e.c +++ b/clang/test/Sema/i-c-e.c @@ -1,4 +1,4 @@ -// RUN: clang %s -fsyntax-only -Xclang -verify -pedantic -fpascal-strings +// RUN: %clang %s -fsyntax-only -Xclang -verify -pedantic -fpascal-strings #include #include diff --git a/clang/test/Sema/return.c b/clang/test/Sema/return.c index 2e8120a7542e..a1d9e5eeedd0 100644 --- a/clang/test/Sema/return.c +++ b/clang/test/Sema/return.c @@ -1,4 +1,4 @@ -// RUN: clang %s -fsyntax-only -Xclang -verify -fblocks +// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks // clang emits the following warning by default. // With GCC, -pedantic, -Wreturn-type or -Wall are required to produce the diff --git a/clang/test/Sema/shift.c b/clang/test/Sema/shift.c index fdfebc589a77..558a7d20065a 100644 --- a/clang/test/Sema/shift.c +++ b/clang/test/Sema/shift.c @@ -1,4 +1,4 @@ -// RUN: clang -Wall -fsyntax-only -Xclang -verify %s +// RUN: %clang -Wall -fsyntax-only -Xclang -verify %s #include diff --git a/clang/test/Sema/surpress-deprecated.c b/clang/test/Sema/surpress-deprecated.c index 8dbe9dd36581..78faf22328a4 100644 --- a/clang/test/Sema/surpress-deprecated.c +++ b/clang/test/Sema/surpress-deprecated.c @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -Wno-deprecated-declarations -verify %s +// RUN: %clang -fsyntax-only -Wno-deprecated-declarations -verify %s extern void OldFunction() __attribute__((deprecated)); int main (int argc, const char * argv[]) { diff --git a/clang/test/Sema/transparent-union.c b/clang/test/Sema/transparent-union.c index 90ecaadea6e7..03f6a53d059a 100644 --- a/clang/test/Sema/transparent-union.c +++ b/clang/test/Sema/transparent-union.c @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -Xclang -verify %s +// RUN: %clang -fsyntax-only -Xclang -verify %s typedef union { int *ip; float *fp; diff --git a/clang/test/Sema/warn-missing-prototypes.c b/clang/test/Sema/warn-missing-prototypes.c index 299d8a726585..bfd1459b41d0 100644 --- a/clang/test/Sema/warn-missing-prototypes.c +++ b/clang/test/Sema/warn-missing-prototypes.c @@ -1,4 +1,4 @@ -// RUN: clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s +// RUN: %clang -Wmissing-prototypes -fsyntax-only -Xclang -verify %s int f(); diff --git a/clang/test/Sema/warn-unused-parameters.c b/clang/test/Sema/warn-unused-parameters.c index afb95166cbce..c6458cf9712b 100644 --- a/clang/test/Sema/warn-unused-parameters.c +++ b/clang/test/Sema/warn-unused-parameters.c @@ -1,4 +1,4 @@ -// RUN: clang -fblocks -fsyntax-only -Wunused-parameter %s -Xclang -verify +// RUN: %clang -fblocks -fsyntax-only -Wunused-parameter %s -Xclang -verify int f0(int x, int y, // expected-warning{{unused}} diff --git a/clang/test/Sema/wchar.c b/clang/test/Sema/wchar.c index ed6649a31d98..edec2b30cea9 100644 --- a/clang/test/Sema/wchar.c +++ b/clang/test/Sema/wchar.c @@ -1,5 +1,5 @@ -// RUN: clang %s -fsyntax-only -Xclang -verify -// RUN: clang %s -fsyntax-only -fshort-wchar -Xclang -verify -DSHORT_WCHAR +// RUN: %clang %s -fsyntax-only -Xclang -verify +// RUN: %clang %s -fsyntax-only -fshort-wchar -Xclang -verify -DSHORT_WCHAR typedef __WCHAR_TYPE__ wchar_t; diff --git a/clang/test/Sema/x86-intrinsics-headers.c b/clang/test/Sema/x86-intrinsics-headers.c index 5b43e2bd07a4..006716ef5ba4 100644 --- a/clang/test/Sema/x86-intrinsics-headers.c +++ b/clang/test/Sema/x86-intrinsics-headers.c @@ -1,6 +1,6 @@ -// RUN: clang -fsyntax-only %s -// RUN: clang -fsyntax-only -fno-lax-vector-conversions %s -// RUN: clang -fsyntax-only -x c++ %s +// RUN: %clang -fsyntax-only %s +// RUN: %clang -fsyntax-only -fno-lax-vector-conversions %s +// RUN: %clang -fsyntax-only -x c++ %s #if defined(i386) || defined(__x86_64__) diff --git a/clang/test/SemaCXX/warn-unused-variables.cpp b/clang/test/SemaCXX/warn-unused-variables.cpp index 019863686d32..83a61bf8e007 100644 --- a/clang/test/SemaCXX/warn-unused-variables.cpp +++ b/clang/test/SemaCXX/warn-unused-variables.cpp @@ -1,4 +1,4 @@ -// RUN: clang -fsyntax-only -Wunused-variable -verify %s +// RUN: %clang -fsyntax-only -Wunused-variable -verify %s template void f() { T t; diff --git a/clang/test/SemaTemplate/example-dynarray.cpp b/clang/test/SemaTemplate/example-dynarray.cpp index 6f3e58e32ab6..1f6ede67a522 100644 --- a/clang/test/SemaTemplate/example-dynarray.cpp +++ b/clang/test/SemaTemplate/example-dynarray.cpp @@ -1,4 +1,4 @@ -// RUN: clang -emit-llvm -S -o %t %s +// RUN: %clang -emit-llvm -S -o %t %s #include #include #include diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg index c561dd8a785b..4d7a17a6b5d6 100644 --- a/clang/test/lit.cfg +++ b/clang/test/lit.cfg @@ -122,6 +122,15 @@ def inferClang(PATH): config.clang = inferClang(config.environment['PATH']) if not lit.quiet: lit.note('using clang: %r' % config.clang) -config.substitutions.append( (' clang ', ' ' + config.clang + ' ') ) config.substitutions.append( ('%clang_cc1', config.clang + ' -cc1') ) +config.substitutions.append( ('%clang', ' ' + config.clang + ' ') ) +# FIXME: Find nicer way to prohibit this. +config.substitutions.append( + (' clang ', """*** Do not use 'clang' in tests, use '%clang'. ***""") ) +config.substitutions.append( + (' clang-cc ', + """*** Do not use 'clang-cc' in tests, use '%clang_cc1'. ***""") ) +config.substitutions.append( + (' clang -cc1 ', + """*** Do not use 'clang -cc1' in tests, use '%clang_cc1'. ***""") )