[X86][AVX512] add vmovss/sd missing encoding
[oota-llvm.git] / include / llvm / ADT / SCCIterator.h
index 4732ef5e91fd017092f7e1881f2e1fab981cf9b0..bc74416ac88baa468cfe1d544c5c5355d7bbd594 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/GraphTraits.h"
+#include "llvm/ADT/iterator.h"
 #include <vector>
 
 namespace llvm {
@@ -37,17 +38,13 @@ namespace llvm {
 /// iterator and thus you cannot backtrack or re-visit nodes.
 template <class GraphT, class GT = GraphTraits<GraphT>>
 class scc_iterator
-    : public std::iterator<std::forward_iterator_tag,
-                           const std::vector<typename GT::NodeType>,
-                           ptrdiff_t> {
+    : public iterator_facade_base<
+          scc_iterator<GraphT, GT>, std::forward_iterator_tag,
+          const std::vector<typename GT::NodeType *>, ptrdiff_t> {
   typedef typename GT::NodeType NodeType;
   typedef typename GT::ChildIteratorType ChildItTy;
   typedef std::vector<NodeType *> SccTy;
-  typedef std::iterator<std::forward_iterator_tag,
-                        const std::vector<typename GT::NodeType>,
-                        ptrdiff_t> super;
-  typedef typename super::reference reference;
-  typedef typename super::pointer pointer;
+  typedef typename scc_iterator::reference reference;
 
   /// Element of VisitStack during DFS.
   struct StackElement {
@@ -115,19 +112,13 @@ public:
   bool operator==(const scc_iterator &x) const {
     return VisitStack == x.VisitStack && CurrentSCC == x.CurrentSCC;
   }
-  bool operator!=(const scc_iterator &x) const { return !operator==(x); }
 
   scc_iterator &operator++() {
     GetNextSCC();
     return *this;
   }
-  scc_iterator operator++(int) {
-    scc_iterator tmp = *this;
-    ++*this;
-    return tmp;
-  }
 
-  const SccTy &operator*() const {
+  reference operator*() const {
     assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!");
     return CurrentSCC;
   }