mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 22:28:22 +00:00
Add CallGraphNode::removeAnyCallEdgeTo method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
111a348435
commit
cd382a3725
@ -251,6 +251,11 @@ public:
|
||||
/// used sparingly.
|
||||
void 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 removeAnyCallEdgeTo(CallGraphNode *Callee);
|
||||
|
||||
private: // Stuff to construct the node, used by CallGraph
|
||||
friend class CallGraph;
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user