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
This commit is contained in:
Eli Bendersky 2013-04-08 18:33:51 +00:00
parent 813456527e
commit c3d5c1cb33
13 changed files with 28 additions and 19 deletions

View 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() {

View 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.

View 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.

View 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()

View 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) {

View 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() {

View 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 {

View 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

View 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"

View 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

View 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

View 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

View 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