aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/DepthFirstIterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/DepthFirstIterator.h')
-rw-r--r--include/llvm/ADT/DepthFirstIterator.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h
index dfba43f..0f69146 100644
--- a/include/llvm/ADT/DepthFirstIterator.h
+++ b/include/llvm/ADT/DepthFirstIterator.h
@@ -231,6 +231,13 @@ df_ext_iterator<T, SetTy> df_ext_end(const T& G, SetTy &S) {
return df_ext_iterator<T, SetTy>::end(G, S);
}
+template <class T, class SetTy>
+iterator_range<df_ext_iterator<T, SetTy>> depth_first_ext(const T& G,
+ SetTy &S) {
+ return iterator_range<df_ext_iterator<T, SetTy>>(df_ext_begin(G, S),
+ df_ext_end(G, S));
+}
+
// Provide global definitions of inverse depth first iterators...
template <class T,
@@ -276,6 +283,13 @@ idf_ext_iterator<T, SetTy> idf_ext_end(const T& G, SetTy &S) {
return idf_ext_iterator<T, SetTy>::end(Inverse<T>(G), S);
}
+template <class T, class SetTy>
+iterator_range<idf_ext_iterator<T, SetTy>> inverse_depth_first_ext(const T& G,
+ SetTy &S) {
+ return iterator_range<idf_ext_iterator<T, SetTy>>(idf_ext_begin(G, S),
+ idf_ext_end(G, S));
+}
+
} // End llvm namespace
#endif