brintos

brintos / llvm-project-archived public Read only

0
0
Text · 537 B · c1cacae Raw
21 lines · plain
1; @f and @g are lazily linked. @f requires @g - ensure @g is correctly linked.2 3; RUN: echo "declare i32 @f(i32)" > %t.1.ll4; RUN: echo "define i32 @h(i32 %x) {" >> %t.1.ll5; RUN: echo "  %1 = call i32 @f(i32 %x)" >> %t.1.ll6; RUN: echo "  ret i32 %1" >> %t.1.ll7; RUN: echo "}" >> %t.1.ll8; RUN: llvm-as < %t.1.ll > %t.1.bc9; RUN: llvm-as < %s > %t.2.bc10; RUN: llvm-link %t.1.bc %t.2.bc11 12define available_externally i32 @f(i32 %x) {13  %1 = call i32 @g(i32 %x)14  ret i32 %115}16 17define available_externally i32 @g(i32 %x) {18  ret i32 519}20 21