diff options
author | Owen Anderson <resistor@mac.com> | 2008-09-05 23:36:01 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-09-05 23:36:01 +0000 |
commit | 6e6074508c2f781c3e52dfe0e301cb1c7f395a91 (patch) | |
tree | 78acc35e61261c50375bff374e13984acdcdce54 /lib/Analysis/IPA/CallGraph.cpp | |
parent | d0c0fae63bbbdb2d26e62736f0654bfdc5193ccc (diff) |
Revert r55859. This is breaking the build in the abscence of its companion commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 4a31295a72..5616ee9a4b 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -282,6 +282,16 @@ void CallGraphNode::print(std::ostream &OS) const { void CallGraphNode::dump() const { print(cerr); } +void CallGraphNode::removeCallEdgeTo(CallGraphNode *Callee) { + for (unsigned i = CalledFunctions.size(); ; --i) { + assert(i && "Cannot find callee to remove!"); + if (CalledFunctions[i-1].second == Callee) { + CalledFunctions.erase(CalledFunctions.begin()+i-1); + return; + } + } +} + /// removeCallEdgeFor - This method removes the edge in the node for the /// specified call site. Note that this method takes linear time, so it /// should be used sparingly. |