Extend RemapInstruction and friends to take an optional new parameter, a ValueMateria...
[oota-llvm.git] / test / Linker / transitive-lazy-link.ll
1 ; @f and @g are lazily linked. @f requires @g - ensure @g is correctly linked.
2
3 ; RUN: echo -e "declare i32 @f(i32)\ndefine i32 @h(i32 %x) {\n%1 = call i32 @f(i32 %x)\nret i32 %1\n}" | llvm-as >%t.1.bc
4 ; RUN: llvm-as < %s > %t.2.bc
5 ; RUN: llvm-link %t.1.bc %t.2.bc
6
7 define available_externally i32 @f(i32 %x) {
8   %1 = call i32 @g(i32 %x)
9   ret i32 %1
10 }
11
12 define available_externally i32 @g(i32 %x) {
13   ret i32 5
14 }
15