Simplify SmallBitVector::applyMask by consolidating common code for 32-bit and 64...
authorYaron Keren <yaron.keren@gmail.com>
Fri, 18 Sep 2015 06:35:12 +0000 (06:35 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Fri, 18 Sep 2015 06:35:12 +0000 (06:35 +0000)
commita028622e48d7af9f70b3fe21ec5b330d6b417eff
tree490156afb185ff3bbcf3daaaddc2c5044d5ee27f
parentfc85502bf60ee6d47d570580611502aee3a34651
Simplify SmallBitVector::applyMask by consolidating common code for 32-bit and 64-bit builds.
Extend mask value to 64 bits before taking its complement and assert when mask is
too large to apply in the small case (previously the extra words were silently ignored).

http://reviews.llvm.org/D11890

Patch by James Touton!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247972 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SmallBitVector.h
unittests/ADT/BitVectorTest.cpp