and used in the same module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37044
91177308-0d34-0410-b5e6-
96231b3b80d8
GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
Reloc::Model RelocM = getTargetMachine().getRelocationModel();
if (RelocM == Reloc::PIC_) {
- bool UseGOTOFF = GV->hasInternalLinkage();
+ bool UseGOTOFF = !GV->isDeclaration();
ARMConstantPoolValue *CPV =
new ARMConstantPoolValue(GV, ARMCP::CPValue, UseGOTOFF ? "GOTOFF":"GOT");
SDOperand CPAddr = DAG.getTargetConstantPool(CPV, PtrVT, 2);