Update the .cvs files.
[oota-llvm.git] / lib / Target / X86 / X86Subtarget.cpp
index 23ceb9ba966dbd15cb748e583898d48bfdc19d3b..b4c58496961acb0dadd0e54d46f70a55e45e94c3 100644 (file)
@@ -44,9 +44,12 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
                GV->hasCommonLinkage() ||
                (GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode())));
     } else if (isTargetELF()) {
-      // Extra load is needed for all non-statics.
-      return (!isDirectCall &&
-              (GV->isDeclaration() || !GV->hasInternalLinkage()));
+      // Extra load is needed for all externally visible.
+      if (isDirectCall)
+        return false;
+      if (GV->hasInternalLinkage() || GV->hasHiddenVisibility())
+        return false;
+      return true;
     } else if (isTargetCygMing() || isTargetWindows()) {
       return (GV->hasDLLImportLinkage());
     }