[llvm-commits] [llvm] r53091 - /llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Anton Korobeynikov
asl at math.spbu.ru
Thu Jul 3 00:43:14 PDT 2008
Author: asl
Date: Thu Jul 3 02:43:14 2008
New Revision: 53091
URL: http://llvm.org/viewvc/llvm-project?rev=53091&view=rev
Log:
llvm-gcc sometimes marks external declarations hidden, because intializers are
processed separately. Honour such situation and emit PIC relocations properly
in such case.
Modified:
llvm/trunk/lib/Target/X86/X86Subtarget.cpp
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=53091&r1=53090&r2=53091&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Thu Jul 3 02:43:14 2008
@@ -47,7 +47,8 @@
// 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()) {
More information about the llvm-commits
mailing list