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
5 %MyVar = external global int
6 %MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
7 external global int ; int*:0
11 %AConst = linkonce constant int 123
13 %Intern1 = internal constant int 42
14 %Intern2 = internal constant int 792
16 ; Initialized to point to external %MyVar
17 %MyVarPtr = linkonce global { int * } { int * %MyVar }
19 declare int "foo"(int %blah) ;; Declared in testlink2.ll
21 declare void "print"(int %Value)
27 %v1 = load int* %MyVar
28 call void %print(int %v1) ;; Should start out 4
30 %idx = getelementptr { \2 *, int }* %MyIntList, long 0, uint 1
32 call void %print(int %v2) ;; Should start out 17
34 call int %foo(int 5) ;; Modify global variablesx
36 %v3 = load int* %MyVar
37 call void %print(int %v3) ;; Should now be 5
40 call void %print(int %v4) ;; Should start out 12
45 internal void "testintern"() begin ret void end
46 internal void "Testintern"() begin ret void end
47 void "testIntern"() begin ret void end