From c8782ad4ee4918b1f7a2499e1e122ccdafc5ddbe Mon Sep 17 00:00:00 2001 From: Andrew Lenharth Date: Fri, 15 Dec 2006 17:34:37 +0000 Subject: [PATCH] extern_weak link test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32602 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Linker/testlink1.ll | 2 ++ test/Linker/weakextern.ll | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/Linker/weakextern.ll diff --git a/test/Linker/testlink1.ll b/test/Linker/testlink1.ll index 845d0fea357..91d983374d3 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 00000000000..a04be672027 --- /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 +