[cfe-commits] r83578 - in /cfe/trunk/test/CodeGen: address-space-field2.c address-space-field3.c address-space-field4.c cast-to-union.c

Mike Stump mrs at apple.com
Thu Oct 8 14:52:07 PDT 2009


Author: mrs
Date: Thu Oct  8 16:52:07 2009
New Revision: 83578

URL: http://llvm.org/viewvc/llvm-project?rev=83578&view=rev
Log:
Convert some tests to FileCheck to be more portable.  Patch by John Thompson.

Modified:
    cfe/trunk/test/CodeGen/address-space-field2.c
    cfe/trunk/test/CodeGen/address-space-field3.c
    cfe/trunk/test/CodeGen/address-space-field4.c
    cfe/trunk/test/CodeGen/cast-to-union.c

Modified: cfe/trunk/test/CodeGen/address-space-field2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/address-space-field2.c?rev=83578&r1=83577&r2=83578&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/address-space-field2.c (original)
+++ cfe/trunk/test/CodeGen/address-space-field2.c Thu Oct  8 16:52:07 2009
@@ -1,6 +1,34 @@
-// RUN: clang-cc -emit-llvm < %s -o %t &&
-// RUN: grep addrspace\(1\) %t | count 8 &&
-// RUN: grep addrspace\(2\) %t | count 9
+// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
 
 // Check that we don't lose the address space when accessing an array element
 // inside a structure.

Modified: cfe/trunk/test/CodeGen/address-space-field3.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/address-space-field3.c?rev=83578&r1=83577&r2=83578&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/address-space-field3.c (original)
+++ cfe/trunk/test/CodeGen/address-space-field3.c Thu Oct  8 16:52:07 2009
@@ -1,6 +1,32 @@
-// RUN: clang-cc -emit-llvm < %s -o %t &&
-// RUN: grep addrspace\(1\) %t | count 8 &&
-// RUN: grep addrspace\(2\) %t | count 8
+// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
 
 // Check that we don't lose the address space when accessing an array element
 // inside a structure.

Modified: cfe/trunk/test/CodeGen/address-space-field4.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/address-space-field4.c?rev=83578&r1=83577&r2=83578&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/address-space-field4.c (original)
+++ cfe/trunk/test/CodeGen/address-space-field4.c Thu Oct  8 16:52:07 2009
@@ -1,6 +1,44 @@
-// RUN: clang-cc -emit-llvm < %s -o %t &&
-// RUN: grep addrspace\(2\) %t | count 4 &&
-// RUN: grep addrspace\(3\) %t | count 4
+// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s
+// CHECK: addrspace(2)
+// CHECK: addrspace(3)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(3)
+// CHECK: addrspace(3)
+// CHECK: addrspace(1)
+// CHECK: addrspace(3)
+// CHECK: addrspace(3)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(1)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
+// CHECK: addrspace(2)
 
 // Check the load and store are using the correct address space to access
 // the variables.

Modified: cfe/trunk/test/CodeGen/cast-to-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cast-to-union.c?rev=83578&r1=83577&r2=83578&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/cast-to-union.c (original)
+++ cfe/trunk/test/CodeGen/cast-to-union.c Thu Oct  8 16:52:07 2009
@@ -1,7 +1,7 @@
-// RUN: clang-cc -emit-llvm < %s -o %t &&
-// RUN: grep "store i32 351, i32*" %t &&
-// RUN: grep "w = global %0 { i32 2, \[4 x i8\] zeroinitializer }" %t &&
-// RUN: grep "y = global %union.u { double 7.300000e+01 }" %t
+// RUN: clang-cc -emit-llvm  %s -o - | FileCheck %s
+// CHECK: w = global %0 { i32 2, [4 x i8] zeroinitializer }
+// CHECK: y = global %union.u { double 7.300000e+0{{[0]*}}1 }
+// CHECK: store i32 351, i32
 
 union u { int i; double d; };
 





More information about the cfe-commits mailing list