[llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraph.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Sep 18 14:34:44 PDT 2004
Changes in directory llvm/lib/Analysis/IPA:
CallGraph.cpp updated: 1.43 -> 1.44
---
Log message:
Add CallGraphNode::removeAnyCallEdgeTo method
---
Diffs of the changes: (+12 -0)
Index: llvm/lib/Analysis/IPA/CallGraph.cpp
diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.43 llvm/lib/Analysis/IPA/CallGraph.cpp:1.44
--- llvm/lib/Analysis/IPA/CallGraph.cpp:1.43 Fri Sep 17 19:27:20 2004
+++ llvm/lib/Analysis/IPA/CallGraph.cpp Sat Sep 18 16:34:34 2004
@@ -206,3 +206,15 @@
}
}
}
+
+// 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();
+ }
+}
More information about the llvm-commits
mailing list