blob: 6f2971a7d647cbc7def76354c5ebbb38e57e2739 [file] [log] [blame]
Reid Spencereb2073b2007-01-27 21:09:03 +00001; Test linking two functions with different prototypes and two globals
2; in different modules.
3; RUN: llvm-as %s -o %t.bar.bc -f
4; RUN: echo "define i32* @foo(i32 %x) { ret i32* @baz } @baz = external global i32" | \
5; RUN: llvm-as -o %t.foo.bc -f
Reid Spencer4a29c482007-01-27 21:10:35 +00006; RUN: llvm-link %t.bar.bc %t.foo.bc -o %t.bc -f
7; RUN: llvm-link %t.foo.bc %t.bar.bc -o %t.bc -f
Reid Spencereb2073b2007-01-27 21:09:03 +00008declare i32* @foo(...)
9define i32* @bar() {
10 %ret = call i32* (...)* @foo( i32 123 )
11 ret i32* %ret
12}
13@baz = global i32 0