ARM/ELF: Restore original (pre-r251322) logic for deciding whether to use GOT.
[oota-llvm.git] / lib / Target / ARM / ARMISelLowering.cpp
index 36f8886ea0ed9a8ecc1fac6807f54288a4f20dad..49f8918b8ddd8d7523c1dc6923e3b3c679091139 100644 (file)
@@ -2637,7 +2637,7 @@ SDValue ARMTargetLowering::LowerGlobalAddressELF(SDValue Op,
   const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
   if (getTargetMachine().getRelocationModel() == Reloc::PIC_) {
     bool UseGOT_PREL =
-        !(GV->hasHiddenVisibility() || GV->isStrongDefinitionForLinker());
+        !(GV->hasHiddenVisibility() || GV->hasLocalLinkage());
 
     MachineFunction &MF = DAG.getMachineFunction();
     ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();