diff options
Diffstat (limited to 'include/llvm/ADT/PostOrderIterator.h')
-rw-r--r-- | include/llvm/ADT/PostOrderIterator.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/llvm/ADT/PostOrderIterator.h b/include/llvm/ADT/PostOrderIterator.h index b477d0a..8315bc9 100644 --- a/include/llvm/ADT/PostOrderIterator.h +++ b/include/llvm/ADT/PostOrderIterator.h @@ -17,7 +17,6 @@ #define LLVM_ADT_POSTORDERITERATOR_H #include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/iterator.h" #include "llvm/ADT/SmallPtrSet.h" #include <set> #include <stack> @@ -43,9 +42,11 @@ template<class GraphT, class SetType = llvm::SmallPtrSet<typename GraphTraits<GraphT>::NodeType*, 8>, bool ExtStorage = false, class GT = GraphTraits<GraphT> > -class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t>, +class po_iterator : public std::iterator<std::forward_iterator_tag, + typename GT::NodeType, ptrdiff_t>, public po_iterator_storage<SetType, ExtStorage> { - typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; + typedef std::iterator<std::forward_iterator_tag, + typename GT::NodeType, ptrdiff_t> super; typedef typename GT::NodeType NodeType; typedef typename GT::ChildIteratorType ChildItTy; @@ -71,7 +72,7 @@ class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t>, inline po_iterator() {} // End is when stack is empty. inline po_iterator(NodeType *BB, SetType &S) : - po_iterator_storage<SetType, ExtStorage>(&S) { + po_iterator_storage<SetType, ExtStorage>(S) { if(!S.count(BB)) { this->Visited.insert(BB); VisitStack.push(std::make_pair(BB, GT::child_begin(BB))); @@ -80,7 +81,7 @@ class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t>, } inline po_iterator(SetType &S) : - po_iterator_storage<SetType, ExtStorage>(&S) { + po_iterator_storage<SetType, ExtStorage>(S) { } // End is when stack is empty. public: typedef typename super::pointer pointer; |