diff options
author | Owen Anderson <resistor@mac.com> | 2009-06-15 22:54:48 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-06-15 22:54:48 +0000 |
commit | 4afb8afb6eb800052c8f2ac2357a2ddffadeead1 (patch) | |
tree | f4b3a250849eff1ed86714a0c45721ddaf32c2c7 /include/llvm/ADT | |
parent | 483736a53df18fee3ebec9a1e41af3e7433bb887 (diff) | |
download | external_llvm-4afb8afb6eb800052c8f2ac2357a2ddffadeead1.zip external_llvm-4afb8afb6eb800052c8f2ac2357a2ddffadeead1.tar.gz external_llvm-4afb8afb6eb800052c8f2ac2357a2ddffadeead1.tar.bz2 |
Owen Anderson 2009-06-15: Use a SmallPtrSet here, for speed and to match df_iterator.
Owen Anderson 2009-06-15: Remember to clear out our maps to prevent crashing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/PostOrderIterator.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/ADT/PostOrderIterator.h b/include/llvm/ADT/PostOrderIterator.h index bf7ce9d..b477d0a 100644 --- a/include/llvm/ADT/PostOrderIterator.h +++ b/include/llvm/ADT/PostOrderIterator.h @@ -18,6 +18,7 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/iterator.h" +#include "llvm/ADT/SmallPtrSet.h" #include <set> #include <stack> #include <vector> @@ -39,9 +40,9 @@ public: }; template<class GraphT, - class SetType = std::set<typename GraphTraits<GraphT>::NodeType*>, - bool ExtStorage = false, - class GT = GraphTraits<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>, public po_iterator_storage<SetType, ExtStorage> { typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super; |