[llvm] [llvm] Use llvm::size (NFC) (PR #168675)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 07:50:20 PST 2025
================
@@ -703,8 +703,7 @@ void RegisterInfoEmitter::emitComposeSubRegIndices(raw_ostream &OS,
SmallVector<unsigned, 4> RowMap;
SmallVector<SmallVector<const CodeGenSubRegIndex *, 4>, 4> Rows;
- auto SubRegIndicesSize =
- std::distance(SubRegIndices.begin(), SubRegIndices.end());
+ auto SubRegIndicesSize = llvm::size(SubRegIndices);
----------------
kazutakahirata wrote:
Sorry, I read this after I merged the PR. Technically, the type of `llvm::size` is a signed type, but I'm happy to change it to an unsigned one.
https://github.com/llvm/llvm-project/pull/168675
More information about the llvm-commits
mailing list