aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-27 21:09:03 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-27 21:09:03 +0000
commiteb2073bf61988a376db0621038da27164d857fa5 (patch)
tree4f1fe10129dadb6fbd2b1d2ec8ce055c1ddc6e1c
parent0fb79b9374c7cd4ba1a68feb62f6e7c27379805c (diff)
downloadexternal_llvm-eb2073bf61988a376db0621038da27164d857fa5.zip
external_llvm-eb2073bf61988a376db0621038da27164d857fa5.tar.gz
external_llvm-eb2073bf61988a376db0621038da27164d857fa5.tar.bz2
Add a test case for PR411.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33588 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Linker/basiclink.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Linker/basiclink.ll b/test/Linker/basiclink.ll
new file mode 100644
index 0000000..5f7c7a1
--- /dev/null
+++ b/test/Linker/basiclink.ll
@@ -0,0 +1,13 @@
+; Test linking two functions with different prototypes and two globals
+; in different modules.
+; RUN: llvm-as %s -o %t.bar.bc -f
+; RUN: echo "define i32* @foo(i32 %x) { ret i32* @baz } @baz = external global i32" | \
+; RUN: llvm-as -o %t.foo.bc -f
+; RUN: llvm-link %t.bar.bc %t.foo.bc -o %t.bc
+; RUN: llvm-link %t.foo.bc %t.bar.bc -o %t.bc
+declare i32* @foo(...)
+define i32* @bar() {
+ %ret = call i32* (...)* @foo( i32 123 )
+ ret i32* %ret
+}
+@baz = global i32 0