[llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DSNode.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 8 19:14:44 PST 2005
Changes in directory llvm/include/llvm/Analysis/DataStructure:
DSNode.h updated: 1.49 -> 1.50
---
Log message:
Add some iterators that should have come in long ago
---
Diffs of the changes: (+10 -0)
DSNode.h | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/include/llvm/Analysis/DataStructure/DSNode.h
diff -u llvm/include/llvm/Analysis/DataStructure/DSNode.h:1.49 llvm/include/llvm/Analysis/DataStructure/DSNode.h:1.50
--- llvm/include/llvm/Analysis/DataStructure/DSNode.h:1.49 Sun Jan 30 17:50:48 2005
+++ llvm/include/llvm/Analysis/DataStructure/DSNode.h Tue Feb 8 21:14:29 2005
@@ -213,6 +213,16 @@
///
unsigned getNumLinks() const { return Links.size(); }
+ /// edge_* - Provide iterators for accessing outgoing edges. Some outgoing
+ /// edges may be null.
+ typedef std::vector<DSNodeHandle>::iterator edge_iterator;
+ typedef std::vector<DSNodeHandle>::const_iterator const_edge_iterator;
+ edge_iterator edge_begin() { return Links.begin(); }
+ edge_iterator edge_end() { return Links.end(); }
+ const_edge_iterator edge_begin() const { return Links.begin(); }
+ const_edge_iterator edge_end() const { return Links.end(); }
+
+
/// mergeTypeInfo - This method merges the specified type into the current
/// node at the specified offset. This may update the current node's type
/// record if this gives more information to the node, it may do nothing to
More information about the llvm-commits
mailing list