Fix the isLocalCall() by checking for linker weakness as well.

llvm-svn: 164155
This commit is contained in:
Roman Divacky 2012-09-18 18:27:49 +00:00
parent 7b511c1a80
commit 748e9dfd91

View File

@ -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;
}