Deleted Added
full compact
PPCSubtarget.cpp (198090) PPCSubtarget.cpp (203954)
1//===- PowerPCSubtarget.cpp - PPC Subtarget Information -------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 116 unchanged lines hidden (view full) ---

125/// is required to get the address of the global.
126bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV,
127 const TargetMachine &TM) const {
128 // We never hae stubs if HasLazyResolverStubs=false or if in static mode.
129 if (!HasLazyResolverStubs || TM.getRelocationModel() == Reloc::Static)
130 return false;
131 // If symbol visibility is hidden, the extra load is not needed if
132 // the symbol is definitely defined in the current translation unit.
1//===- PowerPCSubtarget.cpp - PPC Subtarget Information -------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 116 unchanged lines hidden (view full) ---

125/// is required to get the address of the global.
126bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV,
127 const TargetMachine &TM) const {
128 // We never hae stubs if HasLazyResolverStubs=false or if in static mode.
129 if (!HasLazyResolverStubs || TM.getRelocationModel() == Reloc::Static)
130 return false;
131 // If symbol visibility is hidden, the extra load is not needed if
132 // the symbol is definitely defined in the current translation unit.
133 bool isDecl = GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode();
133 bool isDecl = GV->isDeclaration() && !GV->isMaterializable();
134 if (GV->hasHiddenVisibility() && !isDecl && !GV->hasCommonLinkage())
135 return false;
136 return GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
137 GV->hasCommonLinkage() || isDecl;
138}
134 if (GV->hasHiddenVisibility() && !isDecl && !GV->hasCommonLinkage())
135 return false;
136 return GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
137 GV->hasCommonLinkage() || isDecl;
138}