summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorrdivacky <rdivacky@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-18 18:27:49 +0000
committerrdivacky <rdivacky@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-18 18:27:49 +0000
commit7933540dec45780d26b554211f9fe2fd33dc35a3 (patch)
tree4abe08ec62c78540e7d084439d1b68de59db6cd3 /lib/Target/PowerPC
parent012022f41fac2dede6c3d791e6bbe0abe4c910d0 (diff)
Fix the isLocalCall() by checking for linker weakness as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 6b93d945f8d..3b22ac4acce 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -2812,7 +2812,8 @@ static
bool isLocalCall(const SDValue &Callee)
{
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee))
- return !G->getGlobal()->isDeclaration();
+ return !G->getGlobal()->isDeclaration() &&
+ !G->getGlobal()->isWeakForLinker();
return false;
}