Use vector for child storage instead of map. This will also make
[oota-llvm.git] / include / llvm / ADT / PostOrderIterator.h
index a0ff051542cab286b6dfecb5ff1d96e445a7538a..42c808960d3d04abdda8a7269de579518c87c842 100644 (file)
@@ -20,6 +20,7 @@
 #include "llvm/ADT/iterator"
 #include <stack>
 #include <set>
+#include <vector>
 
 namespace llvm {
 
@@ -46,8 +47,7 @@ class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t>,
   typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super;
   typedef typename GT::NodeType          NodeType;
   typedef typename GT::ChildIteratorType ChildItTy;
-
-  std::set<NodeType *> Visited;    // All of the blocks visited so far...
+  
   // VisitStack - Used to maintain the ordering.  Top = current block
   // First element is basic block pointer, second is the 'next child' to visit
   std::stack<std::pair<NodeType *, ChildItTy> > VisitStack;
@@ -147,7 +147,7 @@ po_ext_iterator<T, SetType> po_ext_end(T G, SetType &S) {
 
 // Provide global definitions of inverse post order iterators...
 template <class T, 
-          class SetType = std::set<typename GraphTraits<T>::NoddeType*>,  
+          class SetType = std::set<typename GraphTraits<T>::NodeType*>,  
           bool External = false> 
 struct ipo_iterator : public po_iterator<Inverse<T>, SetType, External > { 
   ipo_iterator(const po_iterator<Inverse<T>, SetType, External> &V) :