[llvm] [NFCI][LLVM] Adopt `ArrayRef::consume_front()` in a few places (PR #146793)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 4 08:02:35 PDT 2025
kuhar wrote:
> Abstractly, the contents of the ArrayRef do change after this. It has one less element. The fact that it's achieved by pointer manipulation is a detail because ArrayRef does not own the underlying data.
I don't think we should think about modifying the contents at all since it's a view type of container. And ArrayRef specifically is immutable. Similarly, I wouldn't want to rename `drop_front` to `pop_front()`.
https://github.com/llvm/llvm-project/pull/146793
More information about the llvm-commits
mailing list