llvm.org GIT mirror llvm / 8869c2c
New testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5826 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
3 changed file(s) with 20 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: echo "%X = linkonce global int 5 implementation linkonce int %foo() { ret int 7 }" | as > Output/%s.1.bc
1 ; RUN: as < %s > Output/%s.2.bc
2 ; RUN: link Output/%s.[12].bc
3 %X = external global int
4
5 implementation
6
7 declare int %foo()
8
9 void %bar() {
10 load int* %X
11 call int %foo()
12 ret void
13 }
14
11 ; RUN: as < testlink2.ll > Output/testlink2.bc
22 ; RUN: link Output/%s.bc Output/testlink2.bc
33
4 %MyVar = uninitialized global int
4 %MyVar = external global int
55 %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
6 uninitialized global int ; int*:0
6 external global int ; int*:0
77
88 %AConst = constant int 123
99
2424 %v1 = load int* %MyVar
2525 call void %print(int %v1) ;; Should start out 4
2626
27 %idx = getelementptr { \2 *, int }* %MyIntList, uint 0, ubyte 1
27 %idx = getelementptr { \2 *, int }* %MyIntList, long 0, ubyte 1
2828 %v2 = load int* %idx
2929 call void %print(int %v2) ;; Should start out 17
3030
22 ; RUN: echo
33
44 %MyVar = global int 4
5 %MyIntList = uninitialized global { \2 *, int }
5 %MyIntList = external global { \2 *, int }
66
77 %AConst = constant int 123
88
1919 int "foo"(int %blah)
2020 begin
2121 store int %blah, int *%MyVar
22 %idx = getelementptr { \2 *, int } * %MyIntList, uint 0, ubyte 1
22 %idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
2323 store int 12, int* %idx
2424
2525 %ack = load int * %0 ;; Load from the unnamed constant