Try to fix broken build with some compilers.
authorZachary Turner <zturner@google.com>
Fri, 16 Feb 2018 20:58:25 +0000 (20:58 +0000)
committerZachary Turner <zturner@google.com>
Fri, 16 Feb 2018 20:58:25 +0000 (20:58 +0000)
llvm-svn: 325388

llvm/include/llvm/DebugInfo/PDB/Native/HashTable.h

index 231da05..ab462b4 100644 (file)
@@ -26,7 +26,29 @@ class BinaryStreamWriter;
 
 namespace pdb {
 
-class HashTableIterator;
+class HashTableIterator
+    : public iterator_facade_base<HashTableIterator, std::forward_iterator_tag,
+                                  std::pair<uint32_t, uint32_t>> {
+  friend class HashTable;
+
+  HashTableIterator(const HashTable &Map, uint32_t Index, bool IsEnd);
+
+public:
+  HashTableIterator(const HashTable &Map);
+
+  HashTableIterator &operator=(const HashTableIterator &R);
+  bool operator==(const HashTableIterator &R) const;
+  const std::pair<uint32_t, uint32_t> &operator*() const;
+  HashTableIterator &operator++();
+
+private:
+  bool isEnd() const { return IsEnd; }
+  uint32_t index() const { return Index; }
+
+  const HashTable *Map;
+  uint32_t Index;
+  bool IsEnd;
+};
 
 class HashTable {
   friend class HashTableIterator;
@@ -189,30 +211,6 @@ private:
                                     SparseBitVector<> &Vec);
 };
 
-class HashTableIterator
-    : public iterator_facade_base<HashTableIterator, std::forward_iterator_tag,
-                                  std::pair<uint32_t, uint32_t>> {
-  friend class HashTable;
-
-  HashTableIterator(const HashTable &Map, uint32_t Index, bool IsEnd);
-
-public:
-  HashTableIterator(const HashTable &Map);
-
-  HashTableIterator &operator=(const HashTableIterator &R);
-  bool operator==(const HashTableIterator &R) const;
-  const std::pair<uint32_t, uint32_t> &operator*() const;
-  HashTableIterator &operator++();
-
-private:
-  bool isEnd() const { return IsEnd; }
-  uint32_t index() const { return Index; }
-
-  const HashTable *Map;
-  uint32_t Index;
-  bool IsEnd;
-};
-
 } // end namespace pdb
 
 } // end namespace llvm