Update bitcode reader and writer to handle multiple return values.
[oota-llvm.git] / test / Linker / testlink1.ll
1 ; RUN: llvm-upgrade < %s | llvm-as > %t.bc
2 ; RUN: llvm-upgrade < %p/testlink2.ll | llvm-as > %t2.bc
3 ; RUN: llvm-link %t.bc %t2.bc
4
5 %MyVar     = external global int
6 %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
7              external global int      ; int*:0
8
9 %Inte = global int 1
10
11 %AConst    = linkonce constant int 123
12
13 %Intern1   = internal constant int 42
14 %Intern2   = internal constant int 792
15
16 ; Initialized to point to external %MyVar
17 %MyVarPtr  = linkonce global { int * }  { int * %MyVar }
18
19 declare int "foo"(int %blah)      ;; Declared in testlink2.ll
20
21 declare void "print"(int %Value)
22
23 implementation
24
25 void "main"()
26 begin
27         %v1 = load int* %MyVar
28         call void %print(int %v1)    ;; Should start out 4
29
30         %idx = getelementptr { \2 *, int }* %MyIntList, long 0, uint 1
31         %v2 = load int* %idx
32         call void %print(int %v2)    ;; Should start out 17
33
34         call int %foo(int 5)         ;; Modify global variablesx
35
36         %v3 = load int* %MyVar
37         call void %print(int %v3)    ;; Should now be 5
38
39         %v4 = load int* %idx
40         call void %print(int %v4)    ;; Should start out 12
41
42         ret void
43 end
44
45 internal void "testintern"() begin ret void end
46 internal void "Testintern"() begin ret void end
47          void "testIntern"() begin ret void end
48