aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/SmallPtrSet.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-03-04 04:04:43 +0000
committerChris Lattner <sabre@nondot.org>2007-03-04 04:04:43 +0000
commitab8fea5283de0931e1da5dc91b4df2f734ba0206 (patch)
tree47577b61f219ec46bc4c6ca177ff81d073ca63ad /include/llvm/ADT/SmallPtrSet.h
parent9f3d73886612fd06812fb63cf8e6fa10db9b17e7 (diff)
downloadexternal_llvm-ab8fea5283de0931e1da5dc91b4df2f734ba0206.zip
external_llvm-ab8fea5283de0931e1da5dc91b4df2f734ba0206.tar.gz
external_llvm-ab8fea5283de0931e1da5dc91b4df2f734ba0206.tar.bz2
add iterator range version of ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/SmallPtrSet.h')
-rw-r--r--include/llvm/ADT/SmallPtrSet.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h
index f77eb7d..a85b497 100644
--- a/include/llvm/ADT/SmallPtrSet.h
+++ b/include/llvm/ADT/SmallPtrSet.h
@@ -209,6 +209,13 @@ class SmallPtrSet : public SmallPtrSetImpl {
public:
SmallPtrSet() : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {}
+ template<typename It>
+ SmallPtrSet(It I, It E)
+ : SmallPtrSetImpl(NextPowerOfTwo<SmallSizePowTwo>::Val) {
+ for (; I != E; ++I)
+ insert(*I);
+ }
+
typedef SmallPtrSetIterator<PtrType> iterator;
typedef SmallPtrSetIterator<PtrType> const_iterator;
inline iterator begin() const {