diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-21 05:40:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-21 05:40:09 +0000 |
commit | 3ee87b6f9da0f63762ffaf0c4fcbc39514a059fb (patch) | |
tree | 23a4ad5f2ccf44b2ee3e6811135ab4ba43d4adb8 /include/llvm/ADT/DepthFirstIterator.h | |
parent | bdfbb74d34dafba3c5638fdddd561043823ebdd2 (diff) | |
download | external_llvm-3ee87b6f9da0f63762ffaf0c4fcbc39514a059fb.zip external_llvm-3ee87b6f9da0f63762ffaf0c4fcbc39514a059fb.tar.gz external_llvm-3ee87b6f9da0f63762ffaf0c4fcbc39514a059fb.tar.bz2 |
add some inline methods for infix operators on sparse vectors,
tidy some df iteration stuff, patch by John Mosby!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/DepthFirstIterator.h')
-rw-r--r-- | include/llvm/ADT/DepthFirstIterator.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h index b00f585..517768f 100644 --- a/include/llvm/ADT/DepthFirstIterator.h +++ b/include/llvm/ADT/DepthFirstIterator.h @@ -200,14 +200,12 @@ struct idf_iterator : public df_iterator<Inverse<T>, SetTy, External> { template <class T> idf_iterator<T> idf_begin(const T& G) { - Inverse<T> DummyG; - return idf_iterator<T>::begin(DummyG); + return idf_iterator<T>::begin(Inverse<T>(G)); } template <class T> idf_iterator<T> idf_end(const T& G){ - Inverse<T> DummyG; - return idf_iterator<T>::end(DummyG); + return idf_iterator<T>::end(Inverse<T>(G)); } // Provide global definitions of external inverse depth first iterators... @@ -221,14 +219,12 @@ struct idf_ext_iterator : public idf_iterator<T, SetTy, true> { template <class T, class SetTy> idf_ext_iterator<T, SetTy> idf_ext_begin(const T& G, SetTy &S) { - Inverse<T> DummyG(G); - return idf_ext_iterator<T, SetTy>::begin(DummyG, S); + return idf_ext_iterator<T, SetTy>::begin(Inverse<T>(G), S); } template <class T, class SetTy> idf_ext_iterator<T, SetTy> idf_ext_end(const T& G, SetTy &S) { - Inverse<T> DummyG(G); - return idf_ext_iterator<T, SetTy>::end(DummyG, S); + return idf_ext_iterator<T, SetTy>::end(Inverse<T>(G), S); } } // End llvm namespace |