This was likely overlooked when ValueRange was first introduced. There is no
reason why StructuredIndexed needs specifically an ArrayRef so use ValueRange
for better type compatibility with the rest of the APIs.
Reviewed By: nicolasvasilache, mehdi_amini
Differential Revision: https://reviews.llvm.org/D87127
TemplatedIndexedValue operator()(Value index, Args... indices) {
return TemplatedIndexedValue(value, index).append(indices...);
}
- TemplatedIndexedValue operator()(ArrayRef<Value> indices) {
+ TemplatedIndexedValue operator()(ValueRange indices) {
return TemplatedIndexedValue(value, indices);
}
}
private:
- TemplatedIndexedValue(Value value, ArrayRef<Value> indices)
+ TemplatedIndexedValue(Value value, ValueRange indices)
: value(value), indices(indices.begin(), indices.end()) {}
TemplatedIndexedValue &append() { return *this; }