]> granicus.if.org Git - llvm/commit
[Support] Add support for finding unset bits in a BitVector.
authorZachary Turner <zturner@google.com>
Mon, 10 Apr 2017 17:18:54 +0000 (17:18 +0000)
committerZachary Turner <zturner@google.com>
Mon, 10 Apr 2017 17:18:54 +0000 (17:18 +0000)
commita360984c0bf1dc5f018f7b8ee5d2dab9a678c73d
tree4c595d13a1a77664e9e3afce772d14a5e6babf7b
parentd2f46ef6a6114f73c5671ba0760a50a62902b511
[Support] Add support for finding unset bits in a BitVector.

BitVector had methods for searching for the first and next
set bits, but it did not have analagous methods for finding
the first and next unset bits.  This is useful when your ones
and zeros are grouped together and you want to iterate over
ranges of ones and zeros.

Differential Revision: https://reviews.llvm.org/D31802

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