aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-12 21:53:38 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-12 21:53:38 +0000
commitdf41353497b7b561649303a6a8bf23a7cb995f5a (patch)
tree6ba72b39031433f06b1d3744e349f3edc47614e5 /lib/CodeGen
parent39cd6f1662bbe1d0747ebebdcce51ae28078f7a3 (diff)
downloadexternal_llvm-df41353497b7b561649303a6a8bf23a7cb995f5a.zip
external_llvm-df41353497b7b561649303a6a8bf23a7cb995f5a.tar.gz
external_llvm-df41353497b7b561649303a6a8bf23a7cb995f5a.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp
index e2c33b2..501c12c 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<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()) {