aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/CallGraphUpdater.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CallGraphUpdater.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
index 00c6007..2cccfba 100644
--- a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+++ b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
@@ -117,10 +117,10 @@ void CallGraphUpdater::replaceFunctionWith(Function &OldFn, Function &NewFn) {
ReplacedFunctions.insert(&OldFn);
if (CG) {
// Update the call graph for the newly promoted function.
- // CG->spliceFunction(&OldFn, &NewFn);
CallGraphNode *OldCGN = (*CG)[&OldFn];
CallGraphNode *NewCGN = CG->getOrInsertFunction(&NewFn);
NewCGN->stealCalledFunctionsFrom(OldCGN);
+ CG->ReplaceExternalCallEdge(OldCGN, NewCGN);
// And update the SCC we're iterating as well.
CGSCC->ReplaceNode(OldCGN, NewCGN);