From: Nick Lewycky Date: Fri, 12 Jun 2009 17:16:48 +0000 (+0000) Subject: Keep callers of a weak function calling it, instead of the non-weak equivalent. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=93531e49867aca33629a54073241481202635d3e;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index a1d91c256e5..2b7fb5d99d6 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -548,6 +548,7 @@ static bool fold(std::vector &FnVec, unsigned i, unsigned j) { F->getParent()); H->copyAttributesFrom(F); H->takeName(F); + F->replaceAllUsesWith(H); ThunkGToF(F, G); ThunkGToF(F, H);