Rewrite test/Verifier tests to use FileCheck instead of grep
authorEli Bendersky <eliben@google.com>
Mon, 8 Apr 2013 18:33:51 +0000 (18:33 +0000)
committerEli Bendersky <eliben@google.com>
Mon, 8 Apr 2013 18:33:51 +0000 (18:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179036 91177308-0d34-0410-b5e6-96231b3b80d8

13 files changed:
test/Verifier/2002-04-13-RetTypes.ll
test/Verifier/2002-11-05-GetelementptrPointers.ll
test/Verifier/2006-07-11-StoreStruct.ll
test/Verifier/2006-10-15-AddrLabel.ll
test/Verifier/2006-12-12-IntrinsicDefine.ll
test/Verifier/2008-03-01-AllocaSized.ll
test/Verifier/2008-08-22-MemCpyAlignment.ll
test/Verifier/2008-11-15-RetVoid.ll
test/Verifier/2010-08-07-PointerIntrinsic.ll
test/Verifier/AmbiguousPhi.ll
test/Verifier/PhiGrouping.ll
test/Verifier/SelfReferential.ll
test/Verifier/aliasing-chain.ll

index af468395be38d06344d72411fccec7f7236f70e4..9385ebe5ff1a00dbdde1795ae516c795824525b4 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: not llvm-as < %s 2>&1 | grep "value doesn't match function result type 'i32'"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
 
 ; Verify the operand type of the ret instructions in a function match the
-; delcared return type of the function they live in.
+; declared return type of the function they live in.
+; CHECK: value doesn't match function result type 'i32'
 ;
 
 define i32 @testfunc() {
index 108ae5f76579141d5a6fe63f89ecd319befe127a..66b233ec63ae36367ce82ff7f2b7e9b43b65e0c9 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "invalid getelementptr indices"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: invalid getelementptr indices
 
 ; This testcase is invalid because we are indexing into a pointer that is 
 ; contained WITHIN a structure.
index 65b229d1ca9df1550b26717a066f2d7ca501e317..70aea8779bf1d89714a3c49fe46e47b63326c06d 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llvm-as < %s 2>&1 | not grep "Instruction operands must be first-class"
+; RUN: llvm-as < %s 2>&1 | FileCheck %s 
+
+; CHECK-NOT: Instruction operands must be first-class
 
 ; This previously was for PR826, but structs are now first-class so
 ; the following is now valid.
index c8fedb5f195db871a1df442b3acb45273b75c173..decbf5ba42bbcd3471ae59952ab723c0ccfd50e6 100644 (file)
@@ -1,5 +1,6 @@
 ; RUN: not llvm-as < %s > /dev/null 2> %t
-; RUN: grep "basic block pointers are invalid" %t
+; RUN: FileCheck %s --input-file=%t
+; CHECK: basic block pointers are invalid
 
 define i32 @main() {
          %foo  = call i8* %llvm.stacksave()
index 6e7468c1d9ebc3af63569efc2783b9fb20eb5b2f..8cc3d24b5c804ebf1328b2306445dcb53d5be8e9 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "llvm intrinsics cannot be defined"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: llvm intrinsics cannot be defined
 ; PR1047
 
 define void @llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) {
index 51258bef76e58fd632479d36e641e1a7cc4b9ca5..fc12a96e4f9f7f5a431169a6af2aee8e4db9ce46 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Cannot allocate unsized type"
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: Cannot allocate unsized type
 ; PR2113
 
 define void @test() {
index c6d5afd51c953833d9b63acd7ad117304df79cba..3f7cb52343053b416c8914580d532ac6f4368a26 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "alignment argument of memory intrinsics must be a constant int"
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: alignment argument of memory intrinsics must be a constant int
 ; PR2318
 
 define void @x(i8* %a, i8* %src, i64 %len, i32 %align) nounwind  {
index 42503fabbec9e83beb52ed34c0ba5b72dc5fc497..62f6da1131398f967c8124a95a695a31f83c09e9 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "value doesn't match function result type 'void'"
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: value doesn't match function result type 'void'
 
 define void @foo() {
   ret i32 0
index 3136c61514baf0a674aaa557afda98d3857d682a..a668d04213fa78d2d64562259699c11eb9da098f 100644 (file)
@@ -1,5 +1,6 @@
 ; RUN: not llvm-as < %s 2> %t
-; RUN: grep "Broken module" %t
+; RUN: FileCheck %s --input-file=%t
+; CHECK: Broken module
 ; PR7316
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32"
index f31bc107accf4945cbab07c68b9764cf887a5ef1..cb05a728262920ce82bcafde1761e475c44db02f 100644 (file)
@@ -1,6 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "multiple entries for the same basic block"
-
-
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: multiple entries for the same basic block
 
 define i32 @test(i32 %i, i32 %j, i1 %c) {
        br i1 %c, label %A, label %A
index 7b42fd28e3d878e57bd1474a7d0f31902b4fa9b5..291f0848cb2b11bc0908c0f38e3cf0c4a64b0260 100644 (file)
@@ -1,6 +1,5 @@
-; RUN: not llvm-as < %s 2>&1 | grep "PHI nodes not grouped at top"
-
-
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+; CHECK: PHI nodes not grouped at top
 
 define i32 @test(i32 %i, i32 %j, i1 %c) {
        br i1 %c, label %A, label %B
index c24c0ebba3d1222d78d3d5b597f0a4081a1f1b8d..7f0166a158d54f2bee6937ba7c4774f889f3a02f 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: not llvm-as %s -o /dev/null 2>&1 | grep "Only PHI nodes may reference their own value"
+; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: Only PHI nodes may reference their own value
 
 ; Test that self referential instructions are not allowed
 
index a52e796b2b86f61ecd3c35cf400e2530ae9ce8e7..ae0b77fdc395eecd72eea4fc2948efa4fdb5d33c 100644 (file)
@@ -1,5 +1,5 @@
-; RUN:  not llvm-as %s -o /dev/null 2>&1 | grep "Aliasing chain should end with function or global variable"
-
+; RUN:  not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
+; CHECK: Aliasing chain should end with function or global variable
 ; Test that alising chain does not create a cycle
 
 @b1 = alias i32* @c1