aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-09 03:14:29 +0000
committerChris Lattner <sabre@nondot.org>2005-02-09 03:14:29 +0000
commit748ca4de2ca282be05cf99828fd6803cac422a20 (patch)
tree933a4db3b583cd6d2587d3737a7e8752dc8f6e0f /include/llvm
parentca94fa21a3861ec197438df86f33ffdbea52657e (diff)
downloadexternal_llvm-748ca4de2ca282be05cf99828fd6803cac422a20.zip
external_llvm-748ca4de2ca282be05cf99828fd6803cac422a20.tar.gz
external_llvm-748ca4de2ca282be05cf99828fd6803cac422a20.tar.bz2
Add some iterators that should have come in long ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Analysis/DataStructure/DSNode.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h
index 05e9cf6..b6f343f 100644
--- a/include/llvm/Analysis/DataStructure/DSNode.h
+++ b/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