SmallDenseMap constructor with reserve gets an arbitrary NumInitBuckets value and passes it below to init method.
If NumInitBuckets is greater then InlineBuckets, then SmallDenseMap initializes to large representation passing NumInitBuckets below to DenseMap initialization. DenseMap::initEmpty method asserts that initial buckets count must be a power of 2.
Proposed solution is to update NumInitBuckets value in SmallDenseMap constructor till the next power of 2. It should satisfy both DenseMap preconditions and required minimum buckets count for reservation.