From beab85a1e8f0e94202701ba1935596038b77fe4a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 15 Jan 2014 09:08:07 +0000 Subject: [PATCH] Move a bunch of tests to directly use the CC1 layer. This at least saves a subprocess invocation which is pretty significant on Windows. It also likely saves a bunch of thrashing the host machine needlessly. Finally it makes the tests much more predictable and less dependent on the host. For example 'header_lookup1.c' was passing '-fno-ms-extensions' just to thwart the host detection adding it into the compilation. By runnig CC1 directly we don't have to deal with such oddities. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199308 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/lineno-dbginfo.c | 2 +- test/Parser/altivec-csk-bool.c | 2 +- test/Preprocessor/header_lookup1.c | 2 +- test/Sema/attr-malloc.c | 4 ++-- test/Sema/i-c-e.c | 2 +- test/Sema/shift.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/CodeGen/lineno-dbginfo.c b/test/CodeGen/lineno-dbginfo.c index 72fa337eaf..1f9b7a569e 100644 --- a/test/CodeGen/lineno-dbginfo.c +++ b/test/CodeGen/lineno-dbginfo.c @@ -1,5 +1,5 @@ // RUN: echo "#include " > %t.h -// RUN: %clang -S -g -include %t.h %s -emit-llvm -o %t.ll +// RUN: %clang_cc1 -S -g -include %t.h %s -emit-llvm -o %t.ll // RUN: grep "i32 5" %t.ll // outer is at line number 5. int outer = 42; diff --git a/test/Parser/altivec-csk-bool.c b/test/Parser/altivec-csk-bool.c index ba6fa3b2f7..88d78c88b2 100644 --- a/test/Parser/altivec-csk-bool.c +++ b/test/Parser/altivec-csk-bool.c @@ -1,4 +1,4 @@ -// RUN: %clang -target powerpc64-unknown-linux-gnu -maltivec -fsyntax-only %s +// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -faltivec -fsyntax-only %s // PR16456: Verify that bool, true, false are treated as context-sensitive // keywords (and therefore available for use as identifiers) when in diff --git a/test/Preprocessor/header_lookup1.c b/test/Preprocessor/header_lookup1.c index d090936373..336aba6556 100644 --- a/test/Preprocessor/header_lookup1.c +++ b/test/Preprocessor/header_lookup1.c @@ -1,2 +1,2 @@ -// RUN: %clang -fno-ms-extensions %s -E | grep 'stddef.h.*3' +// RUN: %clang_cc1 %s -E | grep 'stddef.h.*3' #include diff --git a/test/Sema/attr-malloc.c b/test/Sema/attr-malloc.c index 2cec84de49..c78d15c802 100644 --- a/test/Sema/attr-malloc.c +++ b/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_cc1 -verify -fsyntax-only %s +// RUN: %clang_cc1 -emit-llvm -o %t %s #include diff --git a/test/Sema/i-c-e.c b/test/Sema/i-c-e.c index 7749b6c1a0..c6025f978e 100644 --- a/test/Sema/i-c-e.c +++ b/test/Sema/i-c-e.c @@ -1,4 +1,4 @@ -// RUN: %clang %s -ffreestanding -Wno-int-to-pointer-cast -fsyntax-only -Xclang -verify -pedantic -fpascal-strings -std=c99 +// RUN: %clang_cc1 %s -ffreestanding -Wno-int-to-pointer-cast -fsyntax-only -verify -pedantic -fpascal-strings -std=c99 #include #include diff --git a/test/Sema/shift.c b/test/Sema/shift.c index 142d83c43d..d355544885 100644 --- a/test/Sema/shift.c +++ b/test/Sema/shift.c @@ -1,4 +1,4 @@ -// RUN: %clang -Wall -Wshift-sign-overflow -ffreestanding -fsyntax-only -Xclang -verify %s +// RUN: %clang_cc1 -Wall -Wshift-sign-overflow -ffreestanding -fsyntax-only -verify %s #include -- 2.40.0