summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-02-21 11:53:32 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-02-21 11:53:32 +0000
commitb5bd026a756d8650f2a94607c9b1dc34cf1c024a (patch)
tree178d1c6b7d74f4fa683da433083ed48e6ab3b069 /test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll
parent8e87e65d28084a5eb0c163256d8473edc2636c5b (diff)
downloadllvm-b5bd026a756d8650f2a94607c9b1dc34cf1c024a.tar.gz
llvm-b5bd026a756d8650f2a94607c9b1dc34cf1c024a.tar.bz2
llvm-b5bd026a756d8650f2a94607c9b1dc34cf1c024a.tar.xz
Drop bunch of half-working stuff in the ext_weak linkage support.
Now we're using one gross, but quite robust hack :) (previous ones did not work, for example, when ext_weak symbol was used deep inside constant expression in the initializer). The proper fix of this problem will require some quite huge asmprinter changes and that's why was postponed. This fixes PR3629 by the way :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll')
-rw-r--r--test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll b/test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll
new file mode 100644
index 0000000000..a6bb7b8615
--- /dev/null
+++ b/test/CodeGen/X86/2009-02-21-ExtWeakInitializer.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | llc | grep weak | count 3
+; PR3629
+
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
+target triple = "x86_64-unknown-freebsd7.1"
+module asm ".ident\09\22$FreeBSD$\22"
+ %struct.anon = type <{ %struct.uart_devinfo* }>
+ %struct.lock_object = type <{ i8*, i32, i32, %struct.witness* }>
+ %struct.mtx = type <{ %struct.lock_object, i64 }>
+ %struct.uart_bas = type <{ i64, i64, i32, i32, i32, i8, i8, i8, i8 }>
+ %struct.uart_class = type opaque
+ %struct.uart_devinfo = type <{ %struct.anon, %struct.uart_ops*, %struct.uart_bas, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32 (%struct.uart_softc*)*, i32 (%struct.uart_softc*)*, i8*, %struct.mtx* }>
+ %struct.uart_ops = type <{ i32 (%struct.uart_bas*)*, void (%struct.uart_bas*, i32, i32, i32, i32)*, void (%struct.uart_bas*)*, void (%struct.uart_bas*, i32)*, i32 (%struct.uart_bas*)*, i32 (%struct.uart_bas*, %struct.mtx*)* }>
+ %struct.uart_softc = type opaque
+ %struct.witness = type opaque
+
+@uart_classes = internal global [3 x %struct.uart_class*] [%struct.uart_class* @uart_ns8250_class, %struct.uart_class* @uart_sab82532_class, %struct.uart_class* @uart_z8530_class], align 8 ; <[3 x %struct.uart_class*]*> [#uses=1]
+@uart_ns8250_class = extern_weak global %struct.uart_class ; <%struct.uart_class*> [#uses=1]
+@uart_sab82532_class = extern_weak global %struct.uart_class ; <%struct.uart_class*> [#uses=1]
+@uart_z8530_class = extern_weak global %struct.uart_class ; <%struct.uart_class*> [#uses=1]