Keep callers of a weak function calling it, instead of the non-weak equivalent.
authorNick Lewycky <nicholas@mxc.ca>
Fri, 12 Jun 2009 17:16:48 +0000 (17:16 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 12 Jun 2009 17:16:48 +0000 (17:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73235 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/MergeFunctions.cpp

index a1d91c256e545e469cbeb4fb308a5ad19c189808..2b7fb5d99d6a9c86c0e0302b614fec4375f88b95 100644 (file)
@@ -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);