diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-02-09 03:14:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-02-09 03:14:29 +0000 |
| commit | 06e353c5a978e31adf4269f91cd02807991bc0cb (patch) | |
| tree | 4c493dbdc56cb90c1e7723743b10527c60af250b /llvm | |
| parent | 81bfc9eda846f7c74f86736ca8adaba8999846b5 (diff) | |
| download | bcm5719-llvm-06e353c5a978e31adf4269f91cd02807991bc0cb.tar.gz bcm5719-llvm-06e353c5a978e31adf4269f91cd02807991bc0cb.zip | |
Add some iterators that should have come in long ago
llvm-svn: 20085
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Analysis/DataStructure/DSNode.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/DataStructure/DSNode.h b/llvm/include/llvm/Analysis/DataStructure/DSNode.h index 05e9cf641ca..b6f343fe4f3 100644 --- a/llvm/include/llvm/Analysis/DataStructure/DSNode.h +++ b/llvm/include/llvm/Analysis/DataStructure/DSNode.h @@ -213,6 +213,16 @@ public: /// 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 |

