aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-09-18 21:34:34 +0000
committerChris Lattner <sabre@nondot.org>2004-09-18 21:34:34 +0000
commitcd382a3725e46a41c6dfb923cd1ee295fa0461aa (patch)
treeb45c52e03b6f78ff682c4f454c040cdf65617543 /lib
parent111a3484359f66090acf8ea3d5a74583c0a75349 (diff)
downloadexternal_llvm-cd382a3725e46a41c6dfb923cd1ee295fa0461aa.zip
external_llvm-cd382a3725e46a41c6dfb923cd1ee295fa0461aa.tar.gz
external_llvm-cd382a3725e46a41c6dfb923cd1ee295fa0461aa.tar.bz2
Add CallGraphNode::removeAnyCallEdgeTo method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16398 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index ac926dc..e3a6024 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -206,3 +206,15 @@ void CallGraphNode::removeCallEdgeTo(CallGraphNode *Callee) {
}
}
}
+
+// removeAnyCallEdgeTo - This method removes any call edges from this node to
+// the specified callee function. This takes more time to execute than
+// removeCallEdgeTo, so it should not be used unless necessary.
+void CallGraphNode::removeAnyCallEdgeTo(CallGraphNode *Callee) {
+ for (std::vector<CallGraphNode*>::iterator I = CalledFunctions.begin(),
+ E = CalledFunctions.end(); I != E; ++I)
+ if (*I == Callee) {
+ CalledFunctions.erase(I);
+ E = CalledFunctions.end();
+ }
+}