diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-03 07:43:14 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-07-03 07:43:14 +0000 |
commit | f550f472ee0a9717f70c78ac422c04e252dbeec9 (patch) | |
tree | 9985e9e83c06d0a00108bb205737a66d64f1ee40 | |
parent | 38976dc394e4eb3c76fc5c31612715ed7c4a16cc (diff) |
llvm-gcc sometimes marks external declarations hidden, because intializers are
processed separately. Honour such situation and emit PIC relocations properly
in such case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53091 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index b4c5849696..fa630edb38 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -47,7 +47,8 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV, // Extra load is needed for all externally visible. if (isDirectCall) return false; - if (GV->hasInternalLinkage() || GV->hasHiddenVisibility()) + if (GV->hasInternalLinkage() || + (GV->hasHiddenVisibility() && !GV->isDeclaration())) return false; return true; } else if (isTargetCygMing() || isTargetWindows()) { |