summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-06-14 20:11:56 +0000
committerChris Lattner <sabre@nondot.org>2010-06-14 20:11:56 +0000
commit6b601536ff1f5d18f738a322a331ed5fdc89e46a (patch)
tree3d2466c815b5d8e7d7317d94bb27e00edd1eddb7 /test
parent82c4fbbc2f581efd8ce6856c89344d1e04527976 (diff)
downloadllvm-6b601536ff1f5d18f738a322a331ed5fdc89e46a.tar.gz
llvm-6b601536ff1f5d18f738a322a331ed5fdc89e46a.tar.bz2
llvm-6b601536ff1f5d18f738a322a331ed5fdc89e46a.tar.xz
fix a nasty bug where we were not treating available_externally
symbols as declarations in the X86 backend. This would manifest on darwin x86-32 as errors like this with -fvisibility=hidden: symbol '__ZNSbIcED1Ev' can not be undefined in a subtraction expression This fixes PR7353. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/hidden-vis-pic.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGen/X86/hidden-vis-pic.ll b/test/CodeGen/X86/hidden-vis-pic.ll
index 88fae37a16..aff4819c83 100644
--- a/test/CodeGen/X86/hidden-vis-pic.ll
+++ b/test/CodeGen/X86/hidden-vis-pic.ll
@@ -1,4 +1,27 @@
; RUN: llc < %s -mtriple=i386-apple-darwin9 -relocation-model=pic -disable-fp-elim -unwind-tables | FileCheck %s
+
+
+
+; PR7353
+
+define available_externally hidden
+void @_ZNSbIcED1Ev() nounwind readnone ssp align 2 {
+entry:
+ ret void
+}
+
+define void()* @test1() nounwind {
+entry:
+ ret void()* @_ZNSbIcED1Ev
+}
+
+; This must use movl of the stub, not an lea, since the function isn't being
+; emitted here.
+; CHECK: movl L__ZNSbIcED1Ev$non_lazy_ptr-L1$pb(
+
+
+
+
; <rdar://problem/7383328>
@.str = private constant [12 x i8] c"hello world\00", align 1 ; <[12 x i8]*> [#uses=1]
@@ -28,3 +51,5 @@ return: ; preds = %entry
; CHECK: .private_extern _func.eh
; CHECK: .private_extern _main.eh
+
+