blob: 7ec511c15a0bbc77c2cddab3ac7d43974735251d [file] [log] [blame]
Chris Lattner285c68d2001-10-13 07:15:38 +00001
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
Chris Lattner230e5ef2001-10-15 03:11:58 +00008; Initialized to point to external %MyVar
9%MyVarPtr = global { int * } { int * %MyVar }
10
Chris Lattner285c68d2001-10-13 07:15:38 +000011declare int "foo"(int %blah) ;; Declared in testlink2.ll
12
13declare void "print"(int %Value)
14
15implementation
16
17void "main"()
18begin
19 %v1 = load int* %MyVar
20 call void %print(int %v1) ;; Should start out 4
21
22 %v2 = load { \2 *, int }* %MyIntList, ubyte 1
23 call void %print(int %v2) ;; Should start out 17
24
25 call int %foo(int 5) ;; Modify global variablesx
26
27 %v3 = load int* %MyVar
28 call void %print(int %v3) ;; Should now be 5
29
30 %v4 = load { \2 *, int }* %MyIntList, ubyte 1
31 call void %print(int %v4) ;; Should start out 12
32
33 ret void
34end
35