Add portable bit mask operations to BitVector.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 17 Jan 2012 01:24:32 +0000 (01:24 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 17 Jan 2012 01:24:32 +0000 (01:24 +0000)
commitff5bad078782b6472d6cd0974bf08fe3473050e6
tree092e54aeef010151749729a892e0950d00751e13
parente02a17c4efb843b8627f3d819c62f88a7f2fb457
Add portable bit mask operations to BitVector.

BitVector uses the native word size for its internal representation.
That doesn't work well for literal bit masks in source code.

This patch adds BitVector operations to efficiently apply literal bit
masks specified as arrays of uint32_t.  Since each array entry always
holds exactly 32 bits, these portable bit masks can be source code
literals, probably produced by TableGen.

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