Test files for linker
[oota-llvm.git] / test / Linker / testlink1.ll
1
2 %MyVar     = uninitialized global int
3 %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
4              uninitialized global int      ; int*:0
5
6 %AConst    = constant int 123
7
8 declare int "foo"(int %blah)      ;; Declared in testlink2.ll
9
10 declare void "print"(int %Value)
11
12 implementation
13
14 void "main"()
15 begin
16         %v1 = load int* %MyVar
17         call void %print(int %v1)    ;; Should start out 4
18
19         %v2 = load { \2 *, int }* %MyIntList, ubyte 1
20         call void %print(int %v2)    ;; Should start out 17
21
22         call int %foo(int 5)         ;; Modify global variablesx
23
24         %v3 = load int* %MyVar
25         call void %print(int %v3)    ;; Should now be 5
26
27         %v4 = load { \2 *, int }* %MyIntList, ubyte 1
28         call void %print(int %v4)    ;; Should start out 12
29
30         ret void
31 end
32