git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143316
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(!Src->hasLocalLinkage() &&
"If Src has internal linkage, Dest shouldn't be set!");
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) {
bool DestIsDeclaration = Dest->isDeclaration();
if (SrcIsDeclaration) {