[llvm] [ADT] Fix an empty BitVector call getData assert `idx < size()' failed (PR #65505)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 11:53:32 PDT 2023


https://github.com/kuhar commented:

+1 to @zero9178's request
> So I think just calling .data() and putting a comment that says something like "Make sure calling .data() is legal even on an empty BitVector" to make sure that we do not regress would be great.

We can also assert that that the arrayref is `.empty()`.
 

https://github.com/llvm/llvm-project/pull/65505


More information about the llvm-commits mailing list