Merge two identical if branches. NFC.

llvm-svn: 273674
This commit is contained in:
Rafael Espindola 2016-06-24 13:08:06 +00:00
parent 41d308689c
commit 01cdf31cab
1 changed files with 11 additions and 14 deletions

View File

@ -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->isStrongDefinitionForLinker() &&
(!GV->hasHiddenVisibility() ||
(GV->isDeclaration() || GV->hasCommonLinkage() ||
GV->hasAvailableExternallyLinkage())) {
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);
}
StubSym = MachineModuleInfoImpl::StubValueTy(getSymbol(GV),
!GV->hasInternalLinkage());
} else {
SymToPrint = getSymbol(GV);
}