From 01cdf31cabd62a1512ac23997902801f3d0fbee9 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 24 Jun 2016 13:08:06 +0000 Subject: [PATCH] Merge two identical if branches. NFC. llvm-svn: 273674 --- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 25 ++++++++++------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 9849ef3efda3..785b36410740 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -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().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().getGVStubEntry( + SymToPrint); + if (!StubSym.getPointer()) + StubSym = MachineModuleInfoImpl::StubValueTy(getSymbol(GV), + !GV->hasInternalLinkage()); } else { SymToPrint = getSymbol(GV); }