diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index e2c33b2455d..501c12c6fe4 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -264,7 +264,7 @@ static Instruction *LowerPartSelect(CallInst *CI) { Name[i] = '_'; Module* M = F->getParent(); F = cast(M->getOrInsertFunction(Name, FT)); - F->setLinkage(GlobalValue::InternalLinkage); + F->setLinkage(GlobalValue::WeakLinkage); // If we haven't defined the impl function yet, do so now if (F->isDeclaration()) { @@ -437,7 +437,7 @@ static Instruction *LowerPartSet(CallInst *CI) { Name[i] = '_'; Module* M = F->getParent(); F = cast(M->getOrInsertFunction(Name, FT)); - F->setLinkage(GlobalValue::InternalLinkage); + F->setLinkage(GlobalValue::WeakLinkage); // If we haven't defined the impl function yet, do so now if (F->isDeclaration()) {