Changes in directory llvm/lib/Target/ARM:
ARMISelLowering.cpp updated: 1.51 -> 1.52 --- Log message: Fix previous patch. GOTOFF can be used only when the symbol has internal linkage or hidden visibility. --- Diffs of the changes: (+1 -1) ARMISelLowering.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.51 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.52 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.51 Mon May 14 13:46:23 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Mon May 14 18:20:21 2007 @@ -792,7 +792,7 @@ GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal(); Reloc::Model RelocM = getTargetMachine().getRelocationModel(); if (RelocM == Reloc::PIC_) { - bool UseGOTOFF = !GV->isDeclaration(); + bool UseGOTOFF = GV->hasInternalLinkage() || GV->hasHiddenVisibility(); ARMConstantPoolValue *CPV = new ARMConstantPoolValue(GV, ARMCP::CPValue, UseGOTOFF ? "GOTOFF":"GOT"); SDOperand CPAddr = DAG.getTargetConstantPool(CPV, PtrVT, 2); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits