forked from OSchip/llvm-project
parent
41d308689c
commit
01cdf31cab
|
@ -200,20 +200,17 @@ void PPCAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
|
|||
|
||||
// External or weakly linked global variables need non-lazily-resolved stubs
|
||||
if (TM.getRelocationModel() != Reloc::Static &&
|
||||
!GV->isStrongDefinitionForLinker()) {
|
||||
if (!GV->hasHiddenVisibility() ||
|
||||
(GV->isDeclaration() || GV->hasCommonLinkage() ||
|
||||
GV->hasAvailableExternallyLinkage())) {
|
||||
SymToPrint = getSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
|
||||
MachineModuleInfoImpl::StubValueTy &StubSym =
|
||||
MMI->getObjFileInfo<MachineModuleInfoMachO>().getGVStubEntry(
|
||||
SymToPrint);
|
||||
if (!StubSym.getPointer())
|
||||
StubSym = MachineModuleInfoImpl::StubValueTy(
|
||||
getSymbol(GV), !GV->hasInternalLinkage());
|
||||
} else {
|
||||
SymToPrint = getSymbol(GV);
|
||||
}
|
||||
!GV->isStrongDefinitionForLinker() &&
|
||||
(!GV->hasHiddenVisibility() ||
|
||||
(GV->isDeclaration() || GV->hasCommonLinkage() ||
|
||||
GV->hasAvailableExternallyLinkage()))) {
|
||||
SymToPrint = getSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
|
||||
MachineModuleInfoImpl::StubValueTy &StubSym =
|
||||
MMI->getObjFileInfo<MachineModuleInfoMachO>().getGVStubEntry(
|
||||
SymToPrint);
|
||||
if (!StubSym.getPointer())
|
||||
StubSym = MachineModuleInfoImpl::StubValueTy(getSymbol(GV),
|
||||
!GV->hasInternalLinkage());
|
||||
} else {
|
||||
SymToPrint = getSymbol(GV);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue