mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 00:14:20 +00:00
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5826 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d34a51dbbe
commit
8869c2cb6a
15
test/Linker/2003-04-21-Linkage.ll
Normal file
15
test/Linker/2003-04-21-Linkage.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > Output/%s.1.bc
|
||||
; RUN: as < %s > Output/%s.2.bc
|
||||
; RUN: link Output/%s.[12].bc
|
||||
%X = external global int
|
||||
|
||||
implementation
|
||||
|
||||
declare int %foo()
|
||||
|
||||
void %bar() {
|
||||
load int* %X
|
||||
call int %foo()
|
||||
ret void
|
||||
}
|
||||
|
@ -2,9 +2,9 @@
|
||||
; RUN: as < testlink2.ll > Output/testlink2.bc
|
||||
; RUN: link Output/%s.bc Output/testlink2.bc
|
||||
|
||||
%MyVar = uninitialized global int
|
||||
%MyVar = external global int
|
||||
%MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
|
||||
uninitialized global int ; int*:0
|
||||
external global int ; int*:0
|
||||
|
||||
%AConst = constant int 123
|
||||
|
||||
@ -25,7 +25,7 @@ begin
|
||||
%v1 = load int* %MyVar
|
||||
call void %print(int %v1) ;; Should start out 4
|
||||
|
||||
%idx = getelementptr { \2 *, int }* %MyIntList, uint 0, ubyte 1
|
||||
%idx = getelementptr { \2 *, int }* %MyIntList, long 0, ubyte 1
|
||||
%v2 = load int* %idx
|
||||
call void %print(int %v2) ;; Should start out 17
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
; RUN: echo
|
||||
|
||||
%MyVar = global int 4
|
||||
%MyIntList = uninitialized global { \2 *, int }
|
||||
%MyIntList = external global { \2 *, int }
|
||||
|
||||
%AConst = constant int 123
|
||||
|
||||
@ -20,7 +20,7 @@ implementation
|
||||
int "foo"(int %blah)
|
||||
begin
|
||||
store int %blah, int *%MyVar
|
||||
%idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1
|
||||
%idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
|
||||
store int 12, int* %idx
|
||||
|
||||
%ack = load int * %0 ;; Load from the unnamed constant
|
||||
|
Loading…
x
Reference in New Issue
Block a user