Teach ModuleLinker::getLinkageResult about materialisable functions

llvm-svn: 143316
This commit is contained in:
Peter Collingbourne 2011-10-30 17:46:34 +00:00
parent c0001c42c6
commit 36e44c926d

View File

@ -446,7 +446,7 @@ bool ModuleLinker::getLinkageResult(GlobalValue *Dest, const GlobalValue *Src,
assert(!Src->hasLocalLinkage() &&
"If Src has internal linkage, Dest shouldn't be set!");
bool SrcIsDeclaration = Src->isDeclaration();
bool SrcIsDeclaration = Src->isDeclaration() && !Src->isMaterializable();
bool DestIsDeclaration = Dest->isDeclaration();
if (SrcIsDeclaration) {