summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraph.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-09-05 23:36:01 +0000
committerOwen Anderson <resistor@mac.com>2008-09-05 23:36:01 +0000
commit1dd2e40521ba06c4b6fb6ff1ed7d6a92a462aa89 (patch)
tree02ac43d5c7fb13b9b07fd1e37cde6dded73b308e /llvm/lib/Analysis/IPA/CallGraph.cpp
parenta9c52c82194df21c7975bae3455d483cad87725d (diff)
downloadbcm5719-llvm-1dd2e40521ba06c4b6fb6ff1ed7d6a92a462aa89.tar.gz
bcm5719-llvm-1dd2e40521ba06c4b6fb6ff1ed7d6a92a462aa89.zip
Revert r55859. This is breaking the build in the abscence of its companion commit.
llvm-svn: 55865
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraph.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index 4a31295a72b..5616ee9a4b0 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud