[llvm] [ADT] Implement EnumeratedArray with std::array (NFC) (PR #158407)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 13 04:56:37 PDT 2025
================
@@ -38,11 +40,7 @@ class EnumeratedArray {
using const_pointer = const ValueType *;
EnumeratedArray() = default;
- EnumeratedArray(ValueType V) {
- for (IndexType IX = 0; IX < Size; ++IX) {
- Underlying[IX] = V;
- }
- }
+ EnumeratedArray(ValueType V) { Underlying.fill(V); }
EnumeratedArray(std::initializer_list<ValueType> Init) {
----------------
kuhar wrote:
This could be a `llvm::copy`, no?
https://github.com/llvm/llvm-project/pull/158407
More information about the llvm-commits
mailing list