//===- Support/DepthFirstIterator.h - Depth First iterator ------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
//
// This file builds on the Support/GraphTraits.h file to build generic depth
// first graph iterator. This file exposes the following functions/types:
#include <vector>
#include <set>
+namespace llvm {
+
// df_iterator_storage - A private class which is used to figure out where to
// store the visited set.
template<class SetType, bool External> // Non-external set
}
// Provide global definitions of external depth first iterators...
-template <class T, class SetTy>
+template <class T, class SetTy = std::set<typename GraphTraits<T>::NodeType*> >
struct df_ext_iterator : public df_iterator<T, SetTy, true> {
df_ext_iterator(const df_iterator<T, SetTy, true> &V)
: df_iterator<T, SetTy, true>(V) {}
return idf_ext_iterator<T, SetTy>::end(G, S);
}
+} // End llvm namespace
#endif