llvm/test/Linker/Inputs/opaque.ll
Rafael Espindola 0178d23ade Link declaration lazily.
We already linked available_externally and linkonce lazily, this just
adds declarations to the list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254917 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-07 16:31:41 +00:00

22 lines
276 B
LLVM

%A = type { }
%B = type { %D, %E, %B* }
%D = type { %E }
%E = type opaque
@g2 = external global %A
@g3 = external global %B
define void @f1() {
getelementptr %A, %A* null, i32 0
ret void
}
define %A* @use_g2() {
ret %A* @g2
}
define %B* @use_g3() {
ret %B* @g3
}