[llvm] r273673 - Merge two identical if branches. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 06:05:20 PDT 2016
Author: rafael
Date: Fri Jun 24 08:05:20 2016
New Revision: 273673
URL: http://llvm.org/viewvc/llvm-project?rev=273673&view=rev
Log:
Merge two identical if branches. NFC.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=273673&r1=273672&r2=273673&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri Jun 24 08:05:20 2016
@@ -201,21 +201,13 @@ void PPCAsmPrinter::printOperand(const M
// External or weakly linked global variables need non-lazily-resolved stubs
if (TM.getRelocationModel() != Reloc::Static &&
!GV->isStrongDefinitionForLinker()) {
- if (!GV->hasHiddenVisibility()) {
+ 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 if (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());
More information about the llvm-commits
mailing list