diff --git a/llvm/include/llvm/ADT/SparseBitVector.h b/llvm/include/llvm/ADT/SparseBitVector.h index 7151af6146e6e..3fec695c6e461 100644 --- a/llvm/include/llvm/ADT/SparseBitVector.h +++ b/llvm/include/llvm/ADT/SparseBitVector.h @@ -152,7 +152,7 @@ template struct SparseBitVectorElement { unsigned WordPos = Curr / BITWORD_SIZE; unsigned BitPos = Curr % BITWORD_SIZE; BitWord Copy = Bits[WordPos]; - assert(WordPos <= BITWORDS_PER_ELEMENT + assert(WordPos < BITWORDS_PER_ELEMENT && "Word Position outside of element"); // Mask off previous bits.