Home | History | Annotate | Download | only in Linker
      1 ; Test linking of a bc file to an archive via llvm-ld. 
      2 ; PR1434
      3 ; RUN: rm -f %t.bar.a %t.foo.a
      4 ; RUN: llvm-as %s -o %t.bar.bc
      5 ; RUN: echo {define i32* @foo(i32 %x) \{ ret i32* @baz \} \
      6 ; RUN:   @baz = external global i32 } | llvm-as -o %t.foo.bc
      7 ; RUN: llvm-ar rcf %t.foo.a %t.foo.bc
      8 ; RUN: llvm-ar rcf %t.bar.a %t.bar.bc
      9 ; RUN: llvm-ld -disable-opt %t.bar.bc %t.foo.a -o %t.bc 
     10 ; RUN: llvm-ld -disable-opt %t.foo.bc %t.bar.a -o %t.bc
     11 declare i32* @foo(...)
     12 define i32* @bar() {
     13 	%ret = call i32* (...)* @foo( i32 123 )
     14 	ret i32* %ret
     15 }
     16 @baz = global i32 0
     17