diff options
-rw-r--r-- | include/llvm/ADT/SmallPtrSet.h | 2 | ||||
-rw-r--r-- | lib/Support/SmallPtrSet.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index 2563982f51..9f975af07c 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -240,7 +240,7 @@ public: // Allow assignment from any smallptrset with the same element type even if it // doesn't have the same smallsize. - const SmallPtrSet<PtrType, SmallSize> + const SmallPtrSet<PtrType, SmallSize>& operator=(const SmallPtrSet<PtrType, SmallSize> &RHS) { CopyFrom(RHS); return *this; diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp index 5ad243033f..e8e530fcee 100644 --- a/lib/Support/SmallPtrSet.cpp +++ b/lib/Support/SmallPtrSet.cpp @@ -164,7 +164,7 @@ SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) { CurArray[CurArraySize] = 0; // Copy over all valid entries. - for (void **BucketPtr = that.CurArray, **E = that.CurArray+CurArraySize; + for (void **BucketPtr = that.CurArray, **E = that.CurArray+that.CurArraySize; BucketPtr != E; ++BucketPtr) { // Copy over the element if it is valid. void *Elt = *BucketPtr; |