[llvm] r179102 - Rewrite test/Linker tests to use FileCheck instead of grep.

Eli Bendersky eliben at google.com
Tue Apr 9 09:51:14 PDT 2013


Author: eliben
Date: Tue Apr  9 11:51:13 2013
New Revision: 179102

URL: http://llvm.org/viewvc/llvm-project?rev=179102&view=rev
Log:
Rewrite test/Linker tests to use FileCheck instead of grep.

Some translations here are not 1x1 because there are grep|grep
chains that are non-trivial to implement in terms of FileCheck features. I
made an effort for the tests to remain as similar as possible; do let me know
if you notice anything fishy. The good news are that some buggy tests were
fixed (grep | not grep - a bug waiting to happen).


Modified:
    llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll
    llvm/trunk/test/Linker/2003-01-30-LinkerTypeRename.ll
    llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll
    llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll
    llvm/trunk/test/Linker/2003-08-23-GlobalVarLinking.ll
    llvm/trunk/test/Linker/2003-08-24-InheritPtrSize.ll
    llvm/trunk/test/Linker/2004-12-03-DisagreeingType.ll
    llvm/trunk/test/Linker/2005-02-12-ConstantGlobals-2.ll
    llvm/trunk/test/Linker/2005-02-12-ConstantGlobals.ll
    llvm/trunk/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
    llvm/trunk/test/Linker/2006-06-15-GlobalVarAlignment.ll
    llvm/trunk/test/Linker/2008-03-07-DroppedSection_a.ll
    llvm/trunk/test/Linker/2008-03-07-DroppedSection_b.ll
    llvm/trunk/test/Linker/2008-06-26-AddressSpace.ll
    llvm/trunk/test/Linker/2011-08-18-unique-class-type.ll
    llvm/trunk/test/Linker/2011-08-18-unique-debug-type.ll
    llvm/trunk/test/Linker/AppendingLinkage.ll
    llvm/trunk/test/Linker/AppendingLinkage2.ll
    llvm/trunk/test/Linker/ConstantGlobals1.ll
    llvm/trunk/test/Linker/ConstantGlobals2.ll
    llvm/trunk/test/Linker/ConstantGlobals3.ll
    llvm/trunk/test/Linker/link-global-to-func.ll
    llvm/trunk/test/Linker/linknamedmdnode.ll
    llvm/trunk/test/Linker/redefinition.ll
    llvm/trunk/test/Linker/weakextern.ll

Modified: llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll (original)
+++ llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll Tue Apr  9 11:51:13 2013
@@ -3,7 +3,8 @@
 
 ; RUN: echo "define internal i32 @foo() { ret i32 7 } " | llvm-as > %t.1.bc
 ; RUN: llvm-as %s -o %t.2.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep "@foo()" | grep -v internal
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: internal{{.*}}@foo{{[0-9]}}()
 
 define i32 @foo() { ret i32 0 }
 

Modified: llvm/trunk/test/Linker/2003-01-30-LinkerTypeRename.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-01-30-LinkerTypeRename.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-01-30-LinkerTypeRename.ll (original)
+++ llvm/trunk/test/Linker/2003-01-30-LinkerTypeRename.ll Tue Apr  9 11:51:13 2013
@@ -3,8 +3,9 @@
 
 ; RUN: echo "%%Ty = type opaque @GV = external global %%Ty*" | llvm-as > %t.1.bc
 ; RUN: llvm-as < %s > %t.2.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep "%%Ty " | not grep opaque
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: = global %Ty
 
 %Ty = type {i32}
 
- at GV = global %Ty* null
\ No newline at end of file
+ at GV = global %Ty* null

Modified: llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll (original)
+++ llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll Tue Apr  9 11:51:13 2013
@@ -4,7 +4,8 @@
 ; RUN: echo " define linkonce void @foo() { ret void } " | \
 ; RUN:   llvm-as -o %t.2.bc
 ; RUN: llvm-as %s -o %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep foo | grep linkonce
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: linkonce{{.*}}foo
 
 declare void @foo()
 

Modified: llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll (original)
+++ llvm/trunk/test/Linker/2003-05-31-LinkerRename.ll Tue Apr  9 11:51:13 2013
@@ -6,7 +6,8 @@
 
 ; RUN: echo " define internal i32 @foo() { ret i32 7 } " | llvm-as > %t.1.bc
 ; RUN: llvm-as < %s > %t.2.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep internal | not grep "@foo("
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: internal {{.*}} @foo{{[0-9]}}(
 
 declare i32 @foo() 
 

Modified: llvm/trunk/test/Linker/2003-08-23-GlobalVarLinking.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-08-23-GlobalVarLinking.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-08-23-GlobalVarLinking.ll (original)
+++ llvm/trunk/test/Linker/2003-08-23-GlobalVarLinking.ll Tue Apr  9 11:51:13 2013
@@ -1,7 +1,8 @@
 ; RUN: llvm-as < %s > %t.out1.bc
 ; RUN: echo "%%T1 = type opaque %%T2 = type opaque @S = external global { i32, %%T1* } declare void @F(%%T2*)"\
 ; RUN:   | llvm-as > %t.out2.bc
-; RUN: llvm-link %t.out1.bc %t.out2.bc -S | not grep opaque
+; RUN: llvm-link %t.out1.bc %t.out2.bc -S | FileCheck %s
+; CHECK-NOT: opaque
 
 ; After linking this testcase, there should be no opaque types left.  The two
 ; S's should cause the opaque type to be resolved to 'int'.

Modified: llvm/trunk/test/Linker/2003-08-24-InheritPtrSize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-08-24-InheritPtrSize.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2003-08-24-InheritPtrSize.ll (original)
+++ llvm/trunk/test/Linker/2003-08-24-InheritPtrSize.ll Tue Apr  9 11:51:13 2013
@@ -3,7 +3,8 @@
 
 ; RUN: llvm-as < %s > %t.out1.bc
 ; RUN: echo "" | llvm-as > %t.out2.bc
-; RUN: llvm-link %t.out1.bc %t.out2.bc 2>&1 | not grep warning
+; RUN: llvm-link %t.out1.bc %t.out2.bc 2>&1 | FileCheck %s 
+; CHECK-NOT: warning
 
 target datalayout = "e-p:64:64"
 

Modified: llvm/trunk/test/Linker/2004-12-03-DisagreeingType.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2004-12-03-DisagreeingType.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2004-12-03-DisagreeingType.ll (original)
+++ llvm/trunk/test/Linker/2004-12-03-DisagreeingType.ll Tue Apr  9 11:51:13 2013
@@ -1,7 +1,8 @@
 ; RUN: echo "@G = weak global {{{{double}}}} zeroinitializer " | \
 ; RUN:   llvm-as > %t.out2.bc
 ; RUN: llvm-as < %s > %t.out1.bc
-; RUN: llvm-link %t.out1.bc %t.out2.bc -S | not grep "}"
+; RUN: llvm-link %t.out1.bc %t.out2.bc -S | FileCheck %s
+; CHECK-NOT: }
 
 ; When linked, the global above should be eliminated, being merged with the 
 ; global below.

Modified: llvm/trunk/test/Linker/2005-02-12-ConstantGlobals-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2005-02-12-ConstantGlobals-2.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2005-02-12-ConstantGlobals-2.ll (original)
+++ llvm/trunk/test/Linker/2005-02-12-ConstantGlobals-2.ll Tue Apr  9 11:51:13 2013
@@ -3,6 +3,7 @@
 
 ; RUN: echo "@X = external constant i32" | llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep "global i32 7"
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: global i32 7
 
 @X = global i32 7

Modified: llvm/trunk/test/Linker/2005-02-12-ConstantGlobals.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2005-02-12-ConstantGlobals.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2005-02-12-ConstantGlobals.ll (original)
+++ llvm/trunk/test/Linker/2005-02-12-ConstantGlobals.ll Tue Apr  9 11:51:13 2013
@@ -3,6 +3,7 @@
 
 ; RUN: echo "@X = global i32 7" | llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep "global i32 7"
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: global i32 7
 
 @X = external constant i32		; <i32*> [#uses=0]

Modified: llvm/trunk/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll (original)
+++ llvm/trunk/test/Linker/2005-12-06-AppendingZeroLengthArrays.ll Tue Apr  9 11:51:13 2013
@@ -1,7 +1,8 @@
 ; RUN: echo " @G = appending global [0 x i32] zeroinitializer " | \
 ; RUN:   llvm-as > %t.out2.bc
 ; RUN: llvm-as < %s > %t.out1.bc
-; RUN: llvm-link %t.out1.bc %t.out2.bc -S | grep "@G ="
+; RUN: llvm-link %t.out1.bc %t.out2.bc -S | FileCheck %s
+; CHECK: @G =
 
 ; When linked, the globals should be merged, and the result should still 
 ; be named '@G'.

Modified: llvm/trunk/test/Linker/2006-06-15-GlobalVarAlignment.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2006-06-15-GlobalVarAlignment.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2006-06-15-GlobalVarAlignment.ll (original)
+++ llvm/trunk/test/Linker/2006-06-15-GlobalVarAlignment.ll Tue Apr  9 11:51:13 2013
@@ -2,6 +2,7 @@
 
 ; RUN: echo "@X = global i32 7, align 8" | llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep "align 8"
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: align 8
 
 @X = weak global i32 7, align 4

Modified: llvm/trunk/test/Linker/2008-03-07-DroppedSection_a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2008-03-07-DroppedSection_a.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2008-03-07-DroppedSection_a.ll (original)
+++ llvm/trunk/test/Linker/2008-03-07-DroppedSection_a.ll Tue Apr  9 11:51:13 2013
@@ -1,7 +1,8 @@
 ; RUN: llvm-as < %s > %t.bc
 ; RUN: llvm-as < %p/2008-03-07-DroppedSection_b.ll > %t2.bc
 ; RUN: llvm-link %t.bc %t2.bc -o %t3.bc
-; RUN: llvm-dis < %t3.bc | grep ".data.init_task"
+; RUN: llvm-dis < %t3.bc | FileCheck %s
+; CHECK: .data.init_task
 
 ; ModuleID = 't.bc'
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"

Modified: llvm/trunk/test/Linker/2008-03-07-DroppedSection_b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2008-03-07-DroppedSection_b.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2008-03-07-DroppedSection_b.ll (original)
+++ llvm/trunk/test/Linker/2008-03-07-DroppedSection_b.ll Tue Apr  9 11:51:13 2013
@@ -1,7 +1,8 @@
 ; RUN: llvm-as < %s > %t.bc
 ; RUN: llvm-as < %p/2008-03-07-DroppedSection_a.ll > %t2.bc
 ; RUN: llvm-link %t.bc %t2.bc -o %t3.bc
-; RUN: llvm-dis < %t3.bc | grep ".data.init_task"
+; RUN: llvm-dis < %t3.bc | FileCheck %s
+; CHECK: .data.init_task
 
 ; ModuleID = 'u.bc'
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"

Modified: llvm/trunk/test/Linker/2008-06-26-AddressSpace.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2008-06-26-AddressSpace.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2008-06-26-AddressSpace.ll (original)
+++ llvm/trunk/test/Linker/2008-06-26-AddressSpace.ll Tue Apr  9 11:51:13 2013
@@ -2,8 +2,9 @@
 ; in different modules.
 ; RUN: llvm-as %s -o %t.foo1.bc
 ; RUN: echo | llvm-as -o %t.foo2.bc
-; RUN: llvm-link %t.foo2.bc %t.foo1.bc -S | grep "addrspace(2)"
-; RUN: llvm-link %t.foo1.bc %t.foo2.bc -S | grep "addrspace(2)"
+; RUN: llvm-link %t.foo2.bc %t.foo1.bc -S | FileCheck %s
+; RUN: llvm-link %t.foo1.bc %t.foo2.bc -S | FileCheck %s
+; CHECK: addrspace(2)
 ; rdar://6038021
 
 @G = addrspace(2) global i32 256 

Modified: llvm/trunk/test/Linker/2011-08-18-unique-class-type.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2011-08-18-unique-class-type.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2011-08-18-unique-class-type.ll (original)
+++ llvm/trunk/test/Linker/2011-08-18-unique-class-type.ll Tue Apr  9 11:51:13 2013
@@ -1,4 +1,6 @@
-; RUN: llvm-link %s %p/2011-08-18-unique-class-type2.ll -S -o - | grep DW_TAG_class_type | count 1
+; RUN: llvm-link %s %p/2011-08-18-unique-class-type2.ll -S -o - | FileCheck %s
+; CHECK: DW_TAG_class_type
+; CHECK-NOT: DW_TAG_class_type
 ; Test to check there is only one MDNode for class A after linking.
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"

Modified: llvm/trunk/test/Linker/2011-08-18-unique-debug-type.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2011-08-18-unique-debug-type.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/2011-08-18-unique-debug-type.ll (original)
+++ llvm/trunk/test/Linker/2011-08-18-unique-debug-type.ll Tue Apr  9 11:51:13 2013
@@ -1,6 +1,6 @@
-
-; RUN: llvm-link %s %p/2011-08-18-unique-debug-type2.ll -S -o - | grep "int" | grep -v "^; ModuleID" | count 1
+; RUN: llvm-link %s %p/2011-08-18-unique-debug-type2.ll -S -o - | FileCheck %s
 ; Test to check only one MDNode for "int" after linking.
+; CHECK: !"int"
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 target triple = "x86_64-apple-macosx10.7.0"
 

Modified: llvm/trunk/test/Linker/AppendingLinkage.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/AppendingLinkage.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/AppendingLinkage.ll (original)
+++ llvm/trunk/test/Linker/AppendingLinkage.ll Tue Apr  9 11:51:13 2013
@@ -3,7 +3,8 @@
 ; RUN: echo "@X = appending global [1 x i32] [i32 8] " | \
 ; RUN:   llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep 7 | grep 4 | grep 8
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: [i32 7, i32 4, i32 8]
 
 @X = appending global [2 x i32] [ i32 7, i32 4 ]		; <[2 x i32]*> [#uses=2]
 @Y = global i32* getelementptr ([2 x i32]* @X, i64 0, i64 0)		; <i32**> [#uses=0]

Modified: llvm/trunk/test/Linker/AppendingLinkage2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/AppendingLinkage2.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/AppendingLinkage2.ll (original)
+++ llvm/trunk/test/Linker/AppendingLinkage2.ll Tue Apr  9 11:51:13 2013
@@ -3,6 +3,7 @@
 ; RUN: echo "@X = appending global [1 x i32] [i32 8] " | \
 ; RUN:   llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep 7 | grep 8
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: [i32 7, i32 8]
 
 @X = appending global [1 x i32] [ i32 7 ]		; <[1 x i32]*> [#uses=0]

Modified: llvm/trunk/test/Linker/ConstantGlobals1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/ConstantGlobals1.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/ConstantGlobals1.ll (original)
+++ llvm/trunk/test/Linker/ConstantGlobals1.ll Tue Apr  9 11:51:13 2013
@@ -3,7 +3,8 @@
 ; RUN: echo "@X = constant [1 x i32] [i32 8] " | \
 ; RUN:   llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep constant
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: constant
 
 @X = external global [1 x i32]		; <[1 x i32]*> [#uses=0]
 

Modified: llvm/trunk/test/Linker/ConstantGlobals2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/ConstantGlobals2.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/ConstantGlobals2.ll (original)
+++ llvm/trunk/test/Linker/ConstantGlobals2.ll Tue Apr  9 11:51:13 2013
@@ -3,7 +3,8 @@
 ; RUN: echo "@X = external global [1 x i32] " | \
 ; RUN:   llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep constant
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: constant
 
 @X = constant [1 x i32] [ i32 12 ]		; <[1 x i32]*> [#uses=0]
 

Modified: llvm/trunk/test/Linker/ConstantGlobals3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/ConstantGlobals3.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/ConstantGlobals3.ll (original)
+++ llvm/trunk/test/Linker/ConstantGlobals3.ll Tue Apr  9 11:51:13 2013
@@ -3,6 +3,7 @@
 ; RUN: echo "@X = external constant [1 x i32] " | \
 ; RUN:   llvm-as > %t.2.bc
 ; RUN: llvm-as < %s > %t.1.bc
-; RUN: llvm-link %t.1.bc %t.2.bc -S | grep constant
+; RUN: llvm-link %t.1.bc %t.2.bc -S | FileCheck %s
+; CHECK: constant
 
 @X = external global [1 x i32]		; <[1 x i32]*> [#uses=0]

Modified: llvm/trunk/test/Linker/link-global-to-func.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/link-global-to-func.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/link-global-to-func.ll (original)
+++ llvm/trunk/test/Linker/link-global-to-func.ll Tue Apr  9 11:51:13 2013
@@ -1,7 +1,8 @@
 ; RUN: llvm-as %s -o %t1.bc
 ; RUN: echo "declare void @__eprintf(i8*, i8*, i32, i8*) noreturn     define void @foo() {      tail call void @__eprintf( i8* undef, i8* undef, i32 4, i8* null ) noreturn nounwind       unreachable }" | llvm-as -o %t2.bc
-; RUN: llvm-link %t2.bc %t1.bc -S | grep __eprintf
-; RUN: llvm-link %t1.bc %t2.bc -S | grep __eprintf
+; RUN: llvm-link %t2.bc %t1.bc -S | FileCheck %s
+; RUN: llvm-link %t1.bc %t2.bc -S | FileCheck %s
+; CHECK: __eprintf
 
 ; rdar://6072702
 

Modified: llvm/trunk/test/Linker/linknamedmdnode.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/linknamedmdnode.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/linknamedmdnode.ll (original)
+++ llvm/trunk/test/Linker/linknamedmdnode.ll Tue Apr  9 11:51:13 2013
@@ -1,6 +1,7 @@
 ; RUN: llvm-as < %s > %t.bc
 ; RUN: llvm-as < %p/linknamedmdnode2.ll > %t2.bc
-; RUN: llvm-link %t.bc %t2.bc -S | grep "!llvm.stuff = !{!0, !1}"
+; RUN: llvm-link %t.bc %t2.bc -S | FileCheck %s
+; CHECK: !llvm.stuff = !{!0, !1}
 
 !0 = metadata !{i32 42}
 !llvm.stuff = !{!0}

Modified: llvm/trunk/test/Linker/redefinition.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/redefinition.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/redefinition.ll (original)
+++ llvm/trunk/test/Linker/redefinition.ll Tue Apr  9 11:51:13 2013
@@ -3,8 +3,7 @@
 ; RUN: llvm-as %s -o %t.foo1.bc
 ; RUN: llvm-as %s -o %t.foo2.bc
 ; RUN: echo "define void @foo(i32 %x) { ret void }" | llvm-as -o %t.foo3.bc
-; RUN: not llvm-link %t.foo1.bc %t.foo2.bc -o %t.bc 2>&1 | \
-; RUN:   grep "symbol multiply defined"
-; RUN: not llvm-link %t.foo1.bc %t.foo3.bc -o %t.bc 2>&1 | \
-; RUN:   grep "symbol multiply defined"
+; RUN: not llvm-link %t.foo1.bc %t.foo2.bc -o %t.bc 2>&1 | FileCheck %s
+; RUN: not llvm-link %t.foo1.bc %t.foo3.bc -o %t.bc 2>&1 | FileCheck %s
+; CHECK: symbol multiply defined
 define void @foo() { ret void }

Modified: llvm/trunk/test/Linker/weakextern.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/weakextern.ll?rev=179102&r1=179101&r2=179102&view=diff
==============================================================================
--- llvm/trunk/test/Linker/weakextern.ll (original)
+++ llvm/trunk/test/Linker/weakextern.ll Tue Apr  9 11:51:13 2013
@@ -1,9 +1,10 @@
 ; RUN: llvm-as < %s > %t.bc
 ; RUN: llvm-as < %p/testlink1.ll > %t2.bc
 ; RUN: llvm-link %t.bc %t.bc %t2.bc -o %t1.bc
-; RUN: llvm-dis < %t1.bc | grep "kallsyms_names = extern_weak"
-; RUN: llvm-dis < %t1.bc | grep "MyVar = external global i32"
-; RUN: llvm-dis < %t1.bc | grep "Inte = global i32"
+; RUN: llvm-dis < %t1.bc | FileCheck %s
+; CHECK: kallsyms_names = extern_weak
+; CHECK: Inte = global i32
+; CHECK: MyVar = external global i32
 
 @kallsyms_names = extern_weak global [0 x i8]		; <[0 x i8]*> [#uses=0]
 @MyVar = extern_weak global i32		; <i32*> [#uses=0]





More information about the llvm-commits mailing list