diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 8b161eae73f..735090627c3 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -359,7 +359,7 @@ private: BucketT *OldBuckets = Buckets; // Double the number of buckets. - while (NumBuckets <= AtLeast) + while (NumBuckets < AtLeast) NumBuckets <<= 1; NumTombstones = 0; Buckets = static_cast(operator new(sizeof(BucketT)*NumBuckets));