summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/basiclink.ll
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
commit5dd5d4b09e29d65aa9025f947936c3df42ddef8b (patch)
tree424a2518254144357a1713cd8e00a68b2f2cedce /llvm/test/Linker/basiclink.ll
parente1e8a58cd378cf51cfd2b14187beb3a02383f739 (diff)
downloadbcm5719-llvm-5dd5d4b09e29d65aa9025f947936c3df42ddef8b.tar.gz
bcm5719-llvm-5dd5d4b09e29d65aa9025f947936c3df42ddef8b.zip
Add a test case for PR411.
llvm-svn: 33588
Diffstat (limited to 'llvm/test/Linker/basiclink.ll')
-rw-r--r--llvm/test/Linker/basiclink.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Linker/basiclink.ll b/llvm/test/Linker/basiclink.ll
new file mode 100644
index 00000000000..5f7c7a12ad6
--- /dev/null
+++ b/llvm/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
OpenPOWER on IntegriCloud