diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h index 05e9cf641ca..b6f343fe4f3 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::iterator edge_iterator; + typedef std::vector::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