llvm.org GIT mirror llvm / eb2073b
Add a test case for PR411. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33588 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
1 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; Test linking two functions with different prototypes and two globals
1 ; in different modules.
2 ; RUN: llvm-as %s -o %t.bar.bc -f
3 ; RUN: echo "define i32* @foo(i32 %x) { ret i32* @baz } @baz = external global i32" | \
4 ; RUN: llvm-as -o %t.foo.bc -f
5 ; RUN: llvm-link %t.bar.bc %t.foo.bc -o %t.bc
6 ; RUN: llvm-link %t.foo.bc %t.bar.bc -o %t.bc
7 declare i32* @foo(...)
8 define i32* @bar() {
9 %ret = call i32* (...)* @foo( i32 123 )
10 ret i32* %ret
11 }
12 @baz = global i32 0