diff options
author | Eli Bendersky <eliben@google.com> | 2013-04-08 18:33:51 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-04-08 18:33:51 +0000 |
commit | c3d5c1cb338f3929f868f6130a2d036ff22e9e1c (patch) | |
tree | c82536fc917ab7c7f3cdf5121bac23b9ae3e8dd5 /test/Verifier | |
parent | 813456527e73f0c1468514c523c6258d360bcd91 (diff) | |
download | llvm-c3d5c1cb338f3929f868f6130a2d036ff22e9e1c.tar.gz llvm-c3d5c1cb338f3929f868f6130a2d036ff22e9e1c.tar.bz2 llvm-c3d5c1cb338f3929f868f6130a2d036ff22e9e1c.tar.xz |
Rewrite test/Verifier tests to use FileCheck instead of grep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Verifier')
-rw-r--r-- | test/Verifier/2002-04-13-RetTypes.ll | 5 | ||||
-rw-r--r-- | test/Verifier/2002-11-05-GetelementptrPointers.ll | 3 | ||||
-rw-r--r-- | test/Verifier/2006-07-11-StoreStruct.ll | 4 | ||||
-rw-r--r-- | test/Verifier/2006-10-15-AddrLabel.ll | 3 | ||||
-rw-r--r-- | test/Verifier/2006-12-12-IntrinsicDefine.ll | 3 | ||||
-rw-r--r-- | test/Verifier/2008-03-01-AllocaSized.ll | 3 | ||||
-rw-r--r-- | test/Verifier/2008-08-22-MemCpyAlignment.ll | 3 | ||||
-rw-r--r-- | test/Verifier/2008-11-15-RetVoid.ll | 3 | ||||
-rw-r--r-- | test/Verifier/2010-08-07-PointerIntrinsic.ll | 3 | ||||
-rw-r--r-- | test/Verifier/AmbiguousPhi.ll | 5 | ||||
-rw-r--r-- | test/Verifier/PhiGrouping.ll | 5 | ||||
-rw-r--r-- | test/Verifier/SelfReferential.ll | 3 | ||||
-rw-r--r-- | test/Verifier/aliasing-chain.ll | 4 |
13 files changed, 28 insertions, 19 deletions
diff --git a/test/Verifier/2002-04-13-RetTypes.ll b/test/Verifier/2002-04-13-RetTypes.ll index af468395be..9385ebe5ff 100644 --- a/test/Verifier/2002-04-13-RetTypes.ll +++ b/test/Verifier/2002-04-13-RetTypes.ll @@ -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() { diff --git a/test/Verifier/2002-11-05-GetelementptrPointers.ll b/test/Verifier/2002-11-05-GetelementptrPointers.ll index 108ae5f765..66b233ec63 100644 --- a/test/Verifier/2002-11-05-GetelementptrPointers.ll +++ b/test/Verifier/2002-11-05-GetelementptrPointers.ll @@ -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. diff --git a/test/Verifier/2006-07-11-StoreStruct.ll b/test/Verifier/2006-07-11-StoreStruct.ll index 65b229d1ca..70aea8779b 100644 --- a/test/Verifier/2006-07-11-StoreStruct.ll +++ b/test/Verifier/2006-07-11-StoreStruct.ll @@ -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. diff --git a/test/Verifier/2006-10-15-AddrLabel.ll b/test/Verifier/2006-10-15-AddrLabel.ll index c8fedb5f19..decbf5ba42 100644 --- a/test/Verifier/2006-10-15-AddrLabel.ll +++ b/test/Verifier/2006-10-15-AddrLabel.ll @@ -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() diff --git a/test/Verifier/2006-12-12-IntrinsicDefine.ll b/test/Verifier/2006-12-12-IntrinsicDefine.ll index 6e7468c1d9..8cc3d24b5c 100644 --- a/test/Verifier/2006-12-12-IntrinsicDefine.ll +++ b/test/Verifier/2006-12-12-IntrinsicDefine.ll @@ -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) { diff --git a/test/Verifier/2008-03-01-AllocaSized.ll b/test/Verifier/2008-03-01-AllocaSized.ll index 51258bef76..fc12a96e4f 100644 --- a/test/Verifier/2008-03-01-AllocaSized.ll +++ b/test/Verifier/2008-03-01-AllocaSized.ll @@ -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() { diff --git a/test/Verifier/2008-08-22-MemCpyAlignment.ll b/test/Verifier/2008-08-22-MemCpyAlignment.ll index c6d5afd51c..3f7cb52343 100644 --- a/test/Verifier/2008-08-22-MemCpyAlignment.ll +++ b/test/Verifier/2008-08-22-MemCpyAlignment.ll @@ -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 { diff --git a/test/Verifier/2008-11-15-RetVoid.ll b/test/Verifier/2008-11-15-RetVoid.ll index 42503fabbe..62f6da1131 100644 --- a/test/Verifier/2008-11-15-RetVoid.ll +++ b/test/Verifier/2008-11-15-RetVoid.ll @@ -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 diff --git a/test/Verifier/2010-08-07-PointerIntrinsic.ll b/test/Verifier/2010-08-07-PointerIntrinsic.ll index 3136c61514..a668d04213 100644 --- a/test/Verifier/2010-08-07-PointerIntrinsic.ll +++ b/test/Verifier/2010-08-07-PointerIntrinsic.ll @@ -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" diff --git a/test/Verifier/AmbiguousPhi.ll b/test/Verifier/AmbiguousPhi.ll index f31bc107ac..cb05a72826 100644 --- a/test/Verifier/AmbiguousPhi.ll +++ b/test/Verifier/AmbiguousPhi.ll @@ -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 diff --git a/test/Verifier/PhiGrouping.ll b/test/Verifier/PhiGrouping.ll index 7b42fd28e3..291f0848cb 100644 --- a/test/Verifier/PhiGrouping.ll +++ b/test/Verifier/PhiGrouping.ll @@ -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 diff --git a/test/Verifier/SelfReferential.ll b/test/Verifier/SelfReferential.ll index c24c0ebba3..7f0166a158 100644 --- a/test/Verifier/SelfReferential.ll +++ b/test/Verifier/SelfReferential.ll @@ -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 diff --git a/test/Verifier/aliasing-chain.ll b/test/Verifier/aliasing-chain.ll index a52e796b2b..ae0b77fdc3 100644 --- a/test/Verifier/aliasing-chain.ll +++ b/test/Verifier/aliasing-chain.ll @@ -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 |