diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-18 00:27:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-18 00:27:20 +0000 |
commit | 85d5ccc0067a297b47625a514772cd8c62c4da8c (patch) | |
tree | d506c3f0e8b21844a8973176810cf5c16322c8d8 /llvm/lib/Analysis/IPA/CallGraph.cpp | |
parent | d4f3238c1211c2449c774b2e3a77d27b65ba920a (diff) | |
download | bcm5719-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.cpp | 1 |
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); } |