Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-09-03 07:04:02 +00:00
parent 8aa9fba7cb
commit 63476a8040
14 changed files with 99 additions and 58 deletions

View File

@@ -1,20 +1,24 @@
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | \
; RUN: grep .hidden | count 2
; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8.8.0 | \
; RUN: grep .private_extern | count 2
; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu | FileCheck %s -check-prefix=LINUX
; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin8 | FileCheck %s -check-prefix=DARWIN
%struct.Person = type { i32 }
@a = hidden global i32 0
@b = external global i32
define weak hidden void @t1() nounwind {
; LINUX: .hidden t1
; LINUX: t1:
define weak hidden void @_ZN6Person13privateMethodEv(%struct.Person* %this) {
; DARWIN: .private_extern _t1
; DARWIN: t1:
ret void
}
declare void @function(i32)
define weak void @t2() nounwind {
; LINUX: t2:
; LINUX: .hidden a
define weak void @_ZN6PersonC1Ei(%struct.Person* %this, i32 %_c) {
; DARWIN: t2:
; DARWIN: .private_extern _a
ret void
}