[llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp
Lauro Ramos Venancio
lauro.venancio at gmail.com
Mon May 14 16:20:40 PDT 2007
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);
More information about the llvm-commits
mailing list