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 | 3795bc9785f32e8fc815014a893efd85f2a4776b (patch) | |
tree | 739fca9287357764fe2eed121f4e90c9ee09bbf0 /lib/Analysis/IPA/CallGraph.cpp | |
parent | ff8c4953863cae2f56477e8a11f42ef7a47a4437 (diff) |
When changing a function, make sure to update the CallGraphNode for the
function, not just the CallGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 8b46e59274..ac926dc59a 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/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); } |