diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-03-09 08:16:40 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-03-09 08:16:40 +0000 |
commit | 76806b6a434ad5477727d3733d18fe309a1281fe (patch) | |
tree | 52f42bc2ac7b48d2e9f86d81304d55c8c777daa5 /test/Linker | |
parent | 90b347dc90a0f002ac5ac1e990991f98371f730b (diff) |
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Linker')
-rw-r--r-- | test/Linker/2002-07-17-GlobalFail.ll | 6 | ||||
-rw-r--r-- | test/Linker/2002-07-17-LinkTest2.ll | 7 | ||||
-rw-r--r-- | test/Linker/2002-08-20-ConstantExpr.ll | 6 | ||||
-rw-r--r-- | test/Linker/2003-04-26-NullPtrLinkProblem.ll | 14 | ||||
-rw-r--r-- | test/Linker/2003-05-15-TypeProblem.ll | 6 | ||||
-rw-r--r-- | test/Linker/2003-06-02-TypeResolveProblem.ll | 6 | ||||
-rw-r--r-- | test/Linker/2003-06-02-TypeResolveProblem2.ll | 7 | ||||
-rw-r--r-- | test/Linker/2003-08-20-OpaqueTypeResolve.ll | 7 | ||||
-rw-r--r-- | test/Linker/2003-08-23-GlobalVarLinking.ll | 10 | ||||
-rw-r--r-- | test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll | 5 | ||||
-rw-r--r-- | test/Linker/2003-08-28-TypeResolvesGlobal.ll | 10 | ||||
-rw-r--r-- | test/Linker/2003-08-28-TypeResolvesGlobal2.ll | 17 | ||||
-rw-r--r-- | test/Linker/2003-08-28-TypeResolvesGlobal3.ll | 12 | ||||
-rw-r--r-- | test/Linker/2003-10-21-ConflictingTypesTolerance.ll | 4 | ||||
-rw-r--r-- | test/Linker/2003-10-27-LinkOncePromote.ll | 6 |
15 files changed, 62 insertions, 61 deletions
diff --git a/test/Linker/2002-07-17-GlobalFail.ll b/test/Linker/2002-07-17-GlobalFail.ll index d950e4019f..d3283106f6 100644 --- a/test/Linker/2002-07-17-GlobalFail.ll +++ b/test/Linker/2002-07-17-GlobalFail.ll @@ -1,8 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.bc +; RUN: llvm-as < %s > %t.bc ; RUN: echo | llvm-as > %t.tmp.bc ; RUN: llvm-link %t.tmp.bc %t.bc -%X = constant int 5 -%Y = internal global [2 x int*] [ int* %X, int * %X] +@X = constant i32 5 ; <i32*> [#uses=2] +@Y = internal global [2 x i32*] [ i32* @X, i32* @X ] ; <[2 x i32*]*> [#uses=0] diff --git a/test/Linker/2002-07-17-LinkTest2.ll b/test/Linker/2002-07-17-LinkTest2.ll index 312b9b90d2..fa986f1572 100644 --- a/test/Linker/2002-07-17-LinkTest2.ll +++ b/test/Linker/2002-07-17-LinkTest2.ll @@ -1,9 +1,10 @@ ; This fails linking when it is linked with an empty file as the first object file ; RUN: llvm-as > %t1.bc < /dev/null -; RUN: llvm-upgrade < %s | llvm-as > %t2.bc +; RUN: llvm-as < %s > %t2.bc ; RUN: llvm-link %t1.bc %t2.bc -%work = global int (int, int)* %zip +@work = global i32 (i32, i32)* @zip ; <i32 (i32, i32)**> [#uses=0] + +declare i32 @zip(i32, i32) -declare int %zip(int, int) diff --git a/test/Linker/2002-08-20-ConstantExpr.ll b/test/Linker/2002-08-20-ConstantExpr.ll index 03b178e96d..5672014ff6 100644 --- a/test/Linker/2002-08-20-ConstantExpr.ll +++ b/test/Linker/2002-08-20-ConstantExpr.ll @@ -1,9 +1,9 @@ ; This fails linking when it is linked with an empty file as the first object file ; RUN: llvm-as > %t.LinkTest.bc < /dev/null -; RUN: llvm-upgrade < %s | llvm-as > %t.bc +; RUN: llvm-as < %s > %t.bc ; RUN: llvm-link %t.LinkTest.bc %t.bc -%work = global int 4 -%test = global int* getelementptr( int* %work, long 1) +@work = global i32 4 ; <i32*> [#uses=1] +@test = global i32* getelementptr (i32* @work, i64 1) ; <i32**> [#uses=0] diff --git a/test/Linker/2003-04-26-NullPtrLinkProblem.ll b/test/Linker/2003-04-26-NullPtrLinkProblem.ll index 029bce264a..c384eadd57 100644 --- a/test/Linker/2003-04-26-NullPtrLinkProblem.ll +++ b/test/Linker/2003-04-26-NullPtrLinkProblem.ll @@ -1,19 +1,17 @@ ; This one fails because the LLVM runtime is allowing two null pointers of ; the same type to be created! -; RUN: echo {%T = type int} | llvm-upgrade | llvm-as > %t.2.bc -; RUN: llvm-upgrade < %s | llvm-as -f > %t.1.bc +; RUN: echo {%T = type i32} | llvm-as > %t.2.bc +; RUN: llvm-as < %s -f > %t.1.bc ; RUN: llvm-link %t.1.bc %t.2.bc %T = type opaque -declare %T* %create() +declare %T* @create() -implementation - -void %test() { - %X = call %T* %create() - %v = seteq %T* %X, null +define void @test() { + %X = call %T* @create( ) ; <%T*> [#uses=1] + %v = icmp eq %T* %X, null ; <i1> [#uses=0] ret void } diff --git a/test/Linker/2003-05-15-TypeProblem.ll b/test/Linker/2003-05-15-TypeProblem.ll index 2c7576fe07..e914a69e34 100644 --- a/test/Linker/2003-05-15-TypeProblem.ll +++ b/test/Linker/2003-05-15-TypeProblem.ll @@ -2,9 +2,9 @@ ; the same type to be created! ; RUN: echo {%S = type \{ %T*\} %T = type opaque} | llvm-as > %t.2.bc -; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.1.bc ; RUN: llvm-link %t.1.bc %t.2.bc -%S = type { %T* } -%T = type int +%S = type { i32* } +%T = type i32 diff --git a/test/Linker/2003-06-02-TypeResolveProblem.ll b/test/Linker/2003-06-02-TypeResolveProblem.ll index 9b1c6f4230..86979f60d1 100644 --- a/test/Linker/2003-06-02-TypeResolveProblem.ll +++ b/test/Linker/2003-06-02-TypeResolveProblem.ll @@ -1,7 +1,7 @@ -; RUN: echo {%T = type opaque} | llvm-upgrade | llvm-as > %t.2.bc -; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc +; RUN: echo {%T = type opaque} | llvm-as > %t.2.bc +; RUN: llvm-as < %s > %t.1.bc ; RUN: llvm-link %t.1.bc %t.2.bc %T = type opaque -%a = constant { %T* } { %T* null } +@a = constant { %T* } zeroinitializer ; <{ %T* }*> [#uses=0] diff --git a/test/Linker/2003-06-02-TypeResolveProblem2.ll b/test/Linker/2003-06-02-TypeResolveProblem2.ll index 0dcca98ac3..42cc0403ae 100644 --- a/test/Linker/2003-06-02-TypeResolveProblem2.ll +++ b/test/Linker/2003-06-02-TypeResolveProblem2.ll @@ -1,8 +1,7 @@ -; RUN: echo {%T = type int} | llvm-upgrade | llvm-as > %t.1.bc -; RUN: llvm-upgrade < %s | llvm-as > %t.2.bc +; RUN: echo {%T = type i32} | llvm-as > %t.1.bc +; RUN: llvm-as < %s > %t.2.bc ; RUN: llvm-link %t.1.bc %t.2.bc %T = type opaque - -%X = constant {%T*} {%T* null } +@X = constant { %T* } zeroinitializer ; <{ %T* }*> [#uses=0] diff --git a/test/Linker/2003-08-20-OpaqueTypeResolve.ll b/test/Linker/2003-08-20-OpaqueTypeResolve.ll index b659b1ab77..a4d4bd543a 100644 --- a/test/Linker/2003-08-20-OpaqueTypeResolve.ll +++ b/test/Linker/2003-08-20-OpaqueTypeResolve.ll @@ -1,7 +1,8 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc -; RUN: echo {%S = type \{ int, int* \} } | llvm-upgrade | llvm-as > %t.out2.bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo {%S = type \{ i32, i32* \} } | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out1.bc %t.out2.bc +%S = type { i32, %T* } %T = type opaque -%S = type { int, %T* } + ;%X = global { int, %T* } { int 5, %T* null } diff --git a/test/Linker/2003-08-23-GlobalVarLinking.ll b/test/Linker/2003-08-23-GlobalVarLinking.ll index 45d77745a2..fd36d0422a 100644 --- a/test/Linker/2003-08-23-GlobalVarLinking.ll +++ b/test/Linker/2003-08-23-GlobalVarLinking.ll @@ -1,10 +1,10 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc -; RUN: echo {%S = external global \{ int, opaque* \} declare void %F(opaque*)}\ -; RUN: | llvm-upgrade | llvm-as > %t.out2.bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo {@S = external global \{ i32, opaque* \} declare void @F(opaque*)}\ +; RUN: | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out1.bc %t.out2.bc | llvm-dis | not grep 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'. -%S = global { int, int* } { int 5, int* null } +@S = global { i32, i32* } { i32 5, i32* null } ; <{ i32, i32* }*> [#uses=0] -declare void %F(int*) +declare void @F(i32*) diff --git a/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll b/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll index 50aae13cce..5041467604 100644 --- a/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll +++ b/test/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll @@ -1,8 +1,9 @@ ; It's a bad idea to go recursively traipsing through types without a safety ; net. -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc -; RUN: echo "%S = type { %S*, int* }" | llvm-upgrade | llvm-as > %t.out2.bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type { %S*, i32* }" | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out1.bc %t.out2.bc %S = type { %S*, opaque* } + diff --git a/test/Linker/2003-08-28-TypeResolvesGlobal.ll b/test/Linker/2003-08-28-TypeResolvesGlobal.ll index 41aef3230b..5526b87ce7 100644 --- a/test/Linker/2003-08-28-TypeResolvesGlobal.ll +++ b/test/Linker/2003-08-28-TypeResolvesGlobal.ll @@ -1,12 +1,12 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc -; RUN: echo "%S = type int" | llvm-upgrade | llvm-as > %t.out2.bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type i32" | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out2.bc %t.out1.bc %S = type opaque -void %foo(int* %V) { - ret void +define void @foo(i32* %V) { + ret void } -declare void %foo(%S*) +declare void @foo.upgrd.1(%S*) diff --git a/test/Linker/2003-08-28-TypeResolvesGlobal2.ll b/test/Linker/2003-08-28-TypeResolvesGlobal2.ll index 212ef2bd1f..3f306b167b 100644 --- a/test/Linker/2003-08-28-TypeResolvesGlobal2.ll +++ b/test/Linker/2003-08-28-TypeResolvesGlobal2.ll @@ -1,17 +1,18 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc -; RUN: echo "%S = type int" | llvm-upgrade | llvm-as > %t.out2.bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type i32" | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out2.bc %t.out1.bc %S = type opaque -void %foo(int* %V) { - ret void +define void @foo(i32* %V) { + ret void } -declare void %foo(%S*) +declare void @foo.upgrd.1(%S*) -void %other() { - call void %foo(%S* null) ; Add a use of the unresolved proto - call void %foo(int* null) ; Add a use of the resolved function +define void @other() { + call void @foo.upgrd.1( %S* null ) + call void @foo( i32* null ) ret void } + diff --git a/test/Linker/2003-08-28-TypeResolvesGlobal3.ll b/test/Linker/2003-08-28-TypeResolvesGlobal3.ll index 5a52f9c1af..38b7851ab8 100644 --- a/test/Linker/2003-08-28-TypeResolvesGlobal3.ll +++ b/test/Linker/2003-08-28-TypeResolvesGlobal3.ll @@ -1,15 +1,15 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc -; RUN: echo "%S = type int" | llvm-upgrade | llvm-as > %t.out2.bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type i32" | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out2.bc %t.out1.bc %S = type opaque ; GLobal using the resolved function prototype -global void(%S*)* %foo +global void (%S*)* @foo ; <void (%S*)**>:0 [#uses=0] -void %foo(int* %V) { - ret void +define void @foo.upgrd.1(i32* %V) { + ret void } -declare void %foo(%S*) +declare void @foo(%S*) diff --git a/test/Linker/2003-10-21-ConflictingTypesTolerance.ll b/test/Linker/2003-10-21-ConflictingTypesTolerance.ll index 07d4b2d900..b3e64da35b 100644 --- a/test/Linker/2003-10-21-ConflictingTypesTolerance.ll +++ b/test/Linker/2003-10-21-ConflictingTypesTolerance.ll @@ -1,7 +1,7 @@ -; RUN: llvm-upgrade < %s | llvm-as > %t.out1.bc +; RUN: llvm-as < %s > %t.out1.bc ; RUN: echo { %S = type \[8 x i32\] external global %S } | llvm-as > %t.out2.bc ; RUN: llvm-link %t.out1.bc %t.out2.bc | llvm-dis | grep %S | grep \{ -%S = type { int } +%S = type { i32 } diff --git a/test/Linker/2003-10-27-LinkOncePromote.ll b/test/Linker/2003-10-27-LinkOncePromote.ll index a4e5aa6cdd..f2d465ed80 100644 --- a/test/Linker/2003-10-27-LinkOncePromote.ll +++ b/test/Linker/2003-10-27-LinkOncePromote.ll @@ -1,8 +1,8 @@ ; The linker should merge link-once globals into strong external globals, ; just like it does for weak symbols! -; RUN: echo "%X = global int 7" | llvm-upgrade | llvm-as > %t.2.bc -; RUN: llvm-upgrade < %s | llvm-as > %t.1.bc +; 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 -%X = linkonce global int 7 +@X = linkonce global i32 7 |