1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

Fix previous patch. GOTOFF can be used only when the symbol has internal

linkage or hidden visibility.

llvm-svn: 37055
This commit is contained in:
Lauro Ramos Venancio 2007-05-14 23:20:21 +00:00
parent eba1b74df3
commit c9c5da3939

View File

@ -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);