aboutsummaryrefslogtreecommitdiffstats
path: root/test/Linker
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-06-27 03:10:24 +0000
committerChris Lattner <sabre@nondot.org>2008-06-27 03:10:24 +0000
commita534b0f7bf0248bf90afe97110a34777e972f325 (patch)
tree2553587f112f8c7792cf81db239c569e48ea8852 /test/Linker
parent83b28890d8dc3f442a10b91b04fc59ceeec3c21f (diff)
downloadexternal_llvm-a534b0f7bf0248bf90afe97110a34777e972f325.zip
external_llvm-a534b0f7bf0248bf90afe97110a34777e972f325.tar.gz
external_llvm-a534b0f7bf0248bf90afe97110a34777e972f325.tar.bz2
when linking globals, make sure to preserve the address space of the global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Linker')
-rw-r--r--test/Linker/2008-06-26-AddressSpace.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Linker/2008-06-26-AddressSpace.ll b/test/Linker/2008-06-26-AddressSpace.ll
new file mode 100644
index 0000000..ee47509
--- /dev/null
+++ b/test/Linker/2008-06-26-AddressSpace.ll
@@ -0,0 +1,9 @@
+; Test linking two functions with different prototypes and two globals
+; in different modules.
+; RUN: llvm-as %s -o %t.foo1.bc -f
+; RUN: echo | llvm-as -o %t.foo2.bc -f
+; RUN: llvm-link %t.foo2.bc %t.foo1.bc | llvm-dis | grep {addrspace(2)}
+; RUN: llvm-link %t.foo1.bc %t.foo2.bc | llvm-dis | grep {addrspace(2)}
+; rdar://6038021
+
+@G = global i32 256 addrspace(2)