Make testcase more interesting
[oota-llvm.git] / test / Linker / testlink2.ll
1 ; This file is used by testlink1.ll, so it doesn't actually do anything itself
2 ;
3 ; RUN: echo
4
5 %MyVar     = global int 4
6 %MyIntList = external global { \2 *, int }
7
8 %AConst    = constant int 123
9
10 %Intern1   = internal constant int 52 ;; Intern in both testlink[12].ll
11 %Intern2   = constant int 12345       ;; Intern in one but not in other
12
13 %MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
14 %MyVarPtr  = linkonce global { int * }  { int * %MyVar }
15
16 constant int 412
17
18 implementation
19
20 int "foo"(int %blah)
21 begin
22         store int %blah, int *%MyVar
23         %idx = getelementptr { \2 *, int } * %MyIntList, long 0, ubyte 1
24         store int 12, int* %idx
25
26         %ack = load int * %0   ;; Load from the unnamed constant
27         %fzo = add int %ack, %blah
28         ret int %fzo
29 end
30
31 declare void "unimp"(float, double)
32
33 internal void "testintern"() begin ret void end
34          void "Testintern"() begin ret void end
35 internal void "testIntern"() begin ret void end
36