diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/SmallPtrSet.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index 40e9bb4..80c078f 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -127,6 +127,10 @@ private: /// Grow - Allocate a larger backing store for the buckets and move it over. void Grow(); + + void operator=(const SmallPtrSetImpl &RHS); // DO NOT IMPLEMENT. +protected: + void CopyFrom(const SmallPtrSetImpl &RHS); }; /// SmallPtrSetIteratorImpl - This is the common base class shared between all @@ -233,6 +237,16 @@ public: inline iterator end() const { return iterator(CurArray+CurArraySize); } + + // Allow assignment from any smallptrset with the same element type even if it + // doesn't have the same smallsize. + template<unsigned RHSSize> + const SmallPtrSet<PtrType, SmallSize> + operator=(const SmallPtrSet<PtrType, RHSSize> &RHS) { + CopyFrom(RHS); + return *this; + } + }; } |