[PATCH] D33104: [BitVector] Implement find_[first/last]_[set/unset]_in
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 10:38:59 PDT 2017
zturner updated this revision to Diff 98656.
zturner added a comment.
Fix the breakage. Given a `BitVector` of size `N` where the last bit (e.g. index `N-1`) was set, the failure occurred when you called `find_first_in(N-1, Size)`. It should have been returning `N-1` but it was returning `-1`. A test was added for this case, and edge boundary tests were added for all other functions as well.
https://reviews.llvm.org/D33104
Files:
llvm/include/llvm/ADT/BitVector.h
llvm/unittests/ADT/BitVectorTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33104.98656.patch
Type: text/x-patch
Size: 16266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170511/65a0b8cb/attachment.bin>
More information about the llvm-commits
mailing list