summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraph.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-09-18 00:27:20 +0000
committerChris Lattner <sabre@nondot.org>2004-09-18 00:27:20 +0000
commit85d5ccc0067a297b47625a514772cd8c62c4da8c (patch)
treed506c3f0e8b21844a8973176810cf5c16322c8d8 /llvm/lib/Analysis/IPA/CallGraph.cpp
parentd4f3238c1211c2449c774b2e3a77d27b65ba920a (diff)
downloadbcm5719-llvm-85d5ccc0067a297b47625a514772cd8c62c4da8c.tar.gz
bcm5719-llvm-85d5ccc0067a297b47625a514772cd8c62c4da8c.zip
When changing a function, make sure to update the CallGraphNode for the
function, not just the CallGraph. llvm-svn: 16388
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraph.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index 8b46e592746..ac926dc59a1 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraph.cpp
@@ -190,6 +190,7 @@ void CallGraph::changeFunction(Function *OldF, Function *NewF) {
assert(I != FunctionMap.end() && I->second && !New &&
"OldF didn't exist in CG or NewF already does!");
New = I->second;
+ New->F = NewF;
FunctionMap.erase(I);
}
OpenPOWER on IntegriCloud