mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-07 18:21:58 +00:00
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
This commit is contained in:
parent
37aecc68ea
commit
f1154e6d96
@ -264,7 +264,7 @@ static Instruction *LowerPartSelect(CallInst *CI) {
|
|||||||
Name[i] = '_';
|
Name[i] = '_';
|
||||||
Module* M = F->getParent();
|
Module* M = F->getParent();
|
||||||
F = cast<Function>(M->getOrInsertFunction(Name, FT));
|
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 we haven't defined the impl function yet, do so now
|
||||||
if (F->isDeclaration()) {
|
if (F->isDeclaration()) {
|
||||||
@ -437,7 +437,7 @@ static Instruction *LowerPartSet(CallInst *CI) {
|
|||||||
Name[i] = '_';
|
Name[i] = '_';
|
||||||
Module* M = F->getParent();
|
Module* M = F->getParent();
|
||||||
F = cast<Function>(M->getOrInsertFunction(Name, FT));
|
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 we haven't defined the impl function yet, do so now
|
||||||
if (F->isDeclaration()) {
|
if (F->isDeclaration()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user