[PATCH] D146231: [ADT] Add `llvm::range_size` function for generic ranges
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 09:31:53 PDT 2023
kuhar added a comment.
In D146231#4199846 <https://reviews.llvm.org/D146231#4199846>, @dblaikie wrote:
> Would `std::distance` suffice?
It does work and this is what we use in the assertions now. The issue is that this degrades to a linear scan over some iterator types (e.g., with sets/maps)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146231/new/
https://reviews.llvm.org/D146231
More information about the llvm-commits
mailing list