[cfe-commits] r154289 - /cfe/trunk/test/Preprocessor/pic.c

Chandler Carruth chandlerc at gmail.com
Sun Apr 8 09:40:30 PDT 2012


Author: chandlerc
Date: Sun Apr  8 11:40:30 2012
New Revision: 154289

URL: http://llvm.org/viewvc/llvm-project?rev=154289&view=rev
Log:
FileCheck-ize this test.

Modified:
    cfe/trunk/test/Preprocessor/pic.c

Modified: cfe/trunk/test/Preprocessor/pic.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/pic.c?rev=154289&r1=154288&r2=154289&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/pic.c (original)
+++ cfe/trunk/test/Preprocessor/pic.c Sun Apr  8 11:40:30 2012
@@ -1,9 +1,12 @@
-// RUN: %clang -target 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 -target 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 -target 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
+// 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





More information about the cfe-commits mailing list