Fixed a type conversion error in BitVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301033 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zachary Turner 2017-04-21 20:18:43 +00:00
parent 82ba8f89e0
commit 9dfab9e768

View File

@ -755,7 +755,7 @@ private:
}
void grow(unsigned NewSize) {
unsigned NewCapacity = std::max(NumBitWords(NewSize), Bits.size() * 2);
size_t NewCapacity = std::max<size_t>(NumBitWords(NewSize), Bits.size() * 2);
assert(NewCapacity > 0 && "realloc-ing zero space");
BitWord *NewBits =
(BitWord *)std::realloc(Bits.data(), NewCapacity * sizeof(BitWord));