From: Peter Collingbourne Date: Sun, 30 Oct 2011 17:46:34 +0000 (+0000) Subject: Teach ModuleLinker::getLinkageResult about materialisable functions X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=8895316d0489e2353c0dce289b49f5cdd41085d7 Teach ModuleLinker::getLinkageResult about materialisable functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143316 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 03a962e3be5..bcc6782129c 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -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) {