aboutsummaryrefslogtreecommitdiffstats
path: root/test/Linker
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-12-15 17:34:37 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-12-15 17:34:37 +0000
commitc8782ad4ee4918b1f7a2499e1e122ccdafc5ddbe (patch)
treeca4a427ff40b636f35cf192fcff93016ceebc551 /test/Linker
parent34da72645a82e11bc7008bc567d63426ec4c5949 (diff)
downloadexternal_llvm-c8782ad4ee4918b1f7a2499e1e122ccdafc5ddbe.zip
external_llvm-c8782ad4ee4918b1f7a2499e1e122ccdafc5ddbe.tar.gz
external_llvm-c8782ad4ee4918b1f7a2499e1e122ccdafc5ddbe.tar.bz2
extern_weak link test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Linker')
-rw-r--r--test/Linker/testlink1.ll2
-rw-r--r--test/Linker/weakextern.ll13
2 files changed, 15 insertions, 0 deletions
diff --git a/test/Linker/testlink1.ll b/test/Linker/testlink1.ll
index 845d0fe..91d9833 100644
--- a/test/Linker/testlink1.ll
+++ b/test/Linker/testlink1.ll
@@ -6,6 +6,8 @@
%MyIntList = global { \2 *, int } { { \2, int }* null, int 17 }
external global int ; int*:0
+%Inte = global int 1
+
%AConst = linkonce constant int 123
%Intern1 = internal constant int 42
diff --git a/test/Linker/weakextern.ll b/test/Linker/weakextern.ll
new file mode 100644
index 0000000..a04be67
--- /dev/null
+++ b/test/Linker/weakextern.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s > %t.bc
+; RUN: llvm-as < `dirname %s`/testlink1.ll > %t2.bc
+; RUN: llvm-link %t.bc %t.bc %t2.bc -o %t1.bc
+; RUN: llvm-dis < %t1.bc |grep "kallsyms_names = extern_weak" &&
+; RUN: llvm-dis < %t1.bc |grep "MyVar = external global int" &&
+; RUN: llvm-dis < %t1.bc |grep "Inte = global int"
+
+%kallsyms_names = extern_weak global [0 x ubyte]
+%MyVar = extern_weak global int
+%Inte = extern_weak global int
+
+implementation
+