Add support for -march=c
[oota-llvm.git] / include / Support / DepthFirstIterator.h
index edb8b2d6bd96bb2222493cb6214e64e70fb8029a..c465f4e549eb5df61b200bff2661ad1aaf6965f4 100644 (file)
@@ -1,4 +1,11 @@
 //===- 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:
@@ -31,6 +38,8 @@
 #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
@@ -162,7 +171,7 @@ df_iterator<T> df_end(T G) {
 }
 
 // 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) {}
@@ -216,5 +225,6 @@ idf_ext_iterator<T, SetTy> idf_ext_end(T G, SetTy &S) {
   return idf_ext_iterator<T, SetTy>::end(G, S);
 }
 
+} // End llvm namespace
 
 #endif