diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index f77eb7d8ca7..a85b4974f89 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::Val) {} + template + SmallPtrSet(It I, It E) + : SmallPtrSetImpl(NextPowerOfTwo::Val) { + for (; I != E; ++I) + insert(*I); + } + typedef SmallPtrSetIterator iterator; typedef SmallPtrSetIterator const_iterator; inline iterator begin() const {