diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-05-14 23:20:21 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-05-14 23:20:21 +0000 |
commit | 5d3d44a84815b848d4493f693a0579efcc2ce42f (patch) | |
tree | 58d4179fb817bdcd2e651b88d5f562c8435310fc /lib/Target/ARM/ARMISelLowering.cpp | |
parent | 2944652569d1beb538f5a72ab1a4bb581ea5cf91 (diff) |
Fix previous patch. GOTOFF can be used only when the symbol has internal
linkage or hidden visibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 30b2a94bb0..d059db1acf 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -792,7 +792,7 @@ SDOperand ARMTargetLowering::LowerGlobalAddressELF(SDOperand Op, 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); |