diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 12 |
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(); + } +} |