Add a test for the Objective-C garbage collection metadata stuff.
[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: true
4
5 %intlist = type { %intlist*, i32 }
6
7
8 %Ty1 = type { %Ty2* }
9 %Ty2 = type opaque
10
11 @GVTy1 = global %Ty1* null
12 @GVTy2 = external global %Ty2*
13
14
15 @MyVar = global i32 4
16 @MyIntList = external global %intlist
17 @AConst = constant i32 1234
18
19 ;; Intern in both testlink[12].ll
20 @Intern1 = internal constant i32 52
21
22 ;; Intern in one but not in other
23 @Intern2 = constant i32 12345
24
25 @MyIntListPtr = constant { %intlist* } { %intlist* @MyIntList }
26 @MyVarPtr = linkonce global { i32* } { i32* @MyVar }
27 @0 = constant i32 412
28
29 ; Provides definition of Struct1 and of S1GV.
30 %Struct1 = type { i32 }
31 @S1GV = global %Struct1* null
32
33 define i32 @foo(i32 %blah) {
34   store i32 %blah, i32* @MyVar
35   %idx = getelementptr %intlist* @MyIntList, i64 0, i32 1
36   store i32 12, i32* %idx
37   %ack = load i32* @0
38   %fzo = add i32 %ack, %blah
39   ret i32 %fzo
40 }
41
42 declare void @unimp(float, double)
43
44 define internal void @testintern() {
45   ret void
46 }
47
48 define void @Testintern() {
49   ret void
50 }
51
52 define internal void @testIntern() {
53   ret void
54 }
55