summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-06-12 17:16:48 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-06-12 17:16:48 +0000
commit93531e49867aca33629a54073241481202635d3e (patch)
treeafc550e3ca13161be2ddee89f2d0db770e68090a
parentbbd8c33ee67f99f5bad7288dfa465d675714e983 (diff)
downloadllvm-93531e49867aca33629a54073241481202635d3e.tar.gz
llvm-93531e49867aca33629a54073241481202635d3e.tar.bz2
llvm-93531e49867aca33629a54073241481202635d3e.tar.xz
Keep callers of a weak function calling it, instead of the non-weak equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73235 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/MergeFunctions.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp
index a1d91c256e..2b7fb5d99d 100644
--- a/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/lib/Transforms/IPO/MergeFunctions.cpp
@@ -548,6 +548,7 @@ static bool fold(std::vector<Function *> &FnVec, unsigned i, unsigned j) {
F->getParent());
H->copyAttributesFrom(F);
H->takeName(F);
+ F->replaceAllUsesWith(H);
ThunkGToF(F, G);
ThunkGToF(F, H);