Simplify SmallBitVector::applyMask by consolidating common code for 32- and 64-bit...
authorYaron Keren <yaron.keren@gmail.com>
Fri, 18 Sep 2015 15:08:24 +0000 (15:08 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Fri, 18 Sep 2015 15:08:24 +0000 (15:08 +0000)
commit81a5ddcd9f703e006cdd44f78562c2a1e7aec0d7
tree469cdba4425ce0effdc2b7bf0370b1cb28c56e26
parent45f413067f4cc8571524788e94ce2ec70102e2eb
Simplify SmallBitVector::applyMask by consolidating common code for 32- and 64-bit builds
and assert when mask is too large to apply in the small case,
previously the extra words were silently ignored.
clang-format the entire function to match current code standards.

This is a rewrite of r247972 which was reverted in r247983 due to
warning and possible UB on 32-bits hosts.

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