From: Chandler Carruth Date: Sun, 8 Apr 2012 16:40:31 +0000 (+0000) Subject: Rephrase the preprocessor test to directly use CC1 and not bother X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=95794225e9f80d4b45d4767e0b4b43f818c585da;p=clang Rephrase the preprocessor test to directly use CC1 and not bother testing any of the strange driver behavior. We already have some tiny tests for the driver behavior, and I'm going to expand them greatly in the next commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154290 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Preprocessor/pic.c b/test/Preprocessor/pic.c index a65cef8409..4597f4301f 100644 --- a/test/Preprocessor/pic.c +++ b/test/Preprocessor/pic.c @@ -1,12 +1,12 @@ -// RUN: %clang -target i386-unknown-unknown -static -dM -E -o - %s \ -// RUN: | FileCheck --check-prefix=CHECK-STATIC %s -// CHECK-STATIC-NOT: #define __PIC__ -// CHECK-STATIC-NOT: #define __pic__ -// RUN: %clang -target i386-unknown-unknown -fpic -dM -E -o - %s \ -// RUN: | FileCheck --check-prefix=CHECK-LOWERPIC %s -// CHECK-LOWERPIC: #define __PIC__ 1 -// CHECK-LOWERPIC: #define __pic__ 1 -// RUN: %clang -target i386-unknown-unknown -fPIC -dM -E -o - %s \ -// RUN: | FileCheck --check-prefix=CHECK-UPPERPIC %s -// CHECK-UPPERPIC: #define __PIC__ 2 -// CHECK-UPPERPIC: #define __pic__ 2 +// RUN: %clang_cc1 -dM -E -o - %s \ +// RUN: | FileCheck %s +// CHECK-NOT: #define __PIC__ +// CHECK-NOT: #define __pic__ +// RUN: %clang_cc1 -pic-level 1 -dM -E -o - %s \ +// RUN: | FileCheck --check-prefix=CHECK-PIC1 %s +// CHECK-PIC1: #define __PIC__ 1 +// CHECK-PIC1: #define __pic__ 1 +// RUN: %clang_cc1 -pic-level 2 -dM -E -o - %s \ +// RUN: | FileCheck --check-prefix=CHECK-PIC2 %s +// CHECK-PIC2: #define __PIC__ 2 +// CHECK-PIC2: #define __pic__ 2