aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-02 16:08:53 +0000
committerChris Lattner <sabre@nondot.org>2009-07-02 16:08:53 +0000
commit0fd4febc137cec041a70eea2a2a28fbeb01dc70d (patch)
tree7d842be25a7547882a421f94fd0372406c604b6f /lib
parentdcf953bcf672f9e5d6bba395a8530c91123b741a (diff)
downloadexternal_llvm-0fd4febc137cec041a70eea2a2a28fbeb01dc70d.zip
external_llvm-0fd4febc137cec041a70eea2a2a28fbeb01dc70d.tar.gz
external_llvm-0fd4febc137cec041a70eea2a2a28fbeb01dc70d.tar.bz2
simplify some logic by using isWeakForLinker(). Thanks to Anton for
pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
index a22dac8..7f1673c 100644
--- a/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
@@ -188,9 +188,7 @@ namespace {
if (TM.getRelocationModel() != Reloc::Static) {
if (MO.getType() == MachineOperand::MO_GlobalAddress) {
GlobalValue *GV = MO.getGlobal();
- if (((GV->isDeclaration() || GV->hasWeakLinkage() ||
- GV->hasLinkOnceLinkage() || GV->hasCommonLinkage() ||
- GV->hasAvailableExternallyLinkage()))) {
+ if (GV->isDeclaration() || GV->isWeakForLinker()) {
// Dynamically-resolved functions need a stub for the function.
std::string Name = Mang->getValueName(GV);
FnStubs.insert(Name);
@@ -383,8 +381,7 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
// External or weakly linked global variables need non-lazily-resolved stubs
if (TM.getRelocationModel() != Reloc::Static) {
- if (GV->isDeclaration() || GV->isWeakForLinker() ||
- GV->hasAvailableExternallyLinkage()) {
+ if (GV->isDeclaration() || GV->isWeakForLinker()) {
if (GV->hasHiddenVisibility()) {
if (GV->isDeclaration() || GV->hasCommonLinkage() ||
GV->hasAvailableExternallyLinkage()) {