From 09adf3decc32fc5df5e2312a15e85023f24a93d2 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 18 Sep 2012 18:27:49 +0000 Subject: [PATCH] Fix the isLocalCall() by checking for linker weakness as well. llvm-svn: 164155 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 6b93d94..3b22ac4 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -2812,7 +2812,8 @@ static bool isLocalCall(const SDValue &Callee) { if (GlobalAddressSDNode *G = dyn_cast(Callee)) - return !G->getGlobal()->isDeclaration(); + return !G->getGlobal()->isDeclaration() && + !G->getGlobal()->isWeakForLinker(); return false; } -- 2.7.4