[llvm-commits] [poolalloc] r98353 - /poolalloc/trunk/include/dsa/DSGraphTraits.h

John Criswell criswell at uiuc.edu
Fri Mar 12 09:09:19 PST 2010

Author: criswell
Date: Fri Mar 12 11:09:19 2010
New Revision: 98353

URL: http://llvm.org/viewvc/llvm-project?rev=98353&view=rev
Switched from using the old LLVM 2.6 llvm/ADT/iterator.h header file to
directly defining our iterator class in terms of the standard C++ iterator
class.  This change was modeled on how llvm/ADT/iterator.h defined
This fixes some compilation problems with LLVM 2.7 (which eliminated the
forward_iterator class).


Modified: poolalloc/trunk/include/dsa/DSGraphTraits.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DSGraphTraits.h?rev=98353&r1=98352&r2=98353&view=diff
--- poolalloc/trunk/include/dsa/DSGraphTraits.h (original)
+++ poolalloc/trunk/include/dsa/DSGraphTraits.h Fri Mar 12 11:09:19 2010
@@ -18,13 +18,14 @@
 #include "dsa/DSGraph.h"
 #include "llvm/ADT/GraphTraits.h"
-#include "llvm/ADT/iterator.h"
 #include "llvm/ADT/STLExtras.h"
+#include <iterator>
 namespace llvm {
 template<typename NodeTy>
-class DSNodeIterator : public forward_iterator<const DSNode, ptrdiff_t> {
+class DSNodeIterator : public std::iterator<std::forward_iterator_tag, const DSNode, ptrdiff_t> {
   friend class DSNode;
   NodeTy * const Node;
   unsigned Offset;

More information about the llvm-commits mailing list