[mlir] Take ValueRange instead of ArrayRef<Value> in StructuredIndexed

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
This commit is contained in:
Alex Zinenko 2020-09-04 10:00:52 +02:00
parent a5046f7ace
commit 1e1a4a4819
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ public:
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);
}
@ -319,7 +319,7 @@ public:
}
private:
TemplatedIndexedValue(Value value, ArrayRef<Value> indices)
TemplatedIndexedValue(Value value, ValueRange indices)
: value(value), indices(indices.begin(), indices.end()) {}
TemplatedIndexedValue &append() { return *this; }