diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-12 21:53:38 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-12 21:53:38 +0000 |
commit | 1b9213730f3c99eb600893ec5be7e11a86a680b8 (patch) | |
tree | 1a75a7938e2660941e18ee33bf49344d79078395 /llvm/lib/CodeGen/IntrinsicLowering.cpp | |
parent | 5c8786962206376a1a9b0646a8243ab2dd3bd073 (diff) | |
download | bcm5719-llvm-1b9213730f3c99eb600893ec5be7e11a86a680b8.tar.gz bcm5719-llvm-1b9213730f3c99eb600893ec5be7e11a86a680b8.zip |
Make sure intrinsics that are lowered to functions make the function weak
linkage so we only end up with one of them in a program. These are, after
all overloaded and templatish in nature.
llvm-svn: 35956
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index e2c33b2455d..501c12c6fe4 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -264,7 +264,7 @@ static Instruction *LowerPartSelect(CallInst *CI) { Name[i] = '_'; Module* M = F->getParent(); F = cast<Function>(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<Function>(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()) { |