From 1e1a4a481987f77fe3e6debc015c1d07af249258 Mon Sep 17 00:00:00 2001 From: Alex Zinenko Date: Fri, 4 Sep 2020 10:00:52 +0200 Subject: [PATCH] [mlir] Take ValueRange instead of ArrayRef 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 --- mlir/include/mlir/EDSC/Builders.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/EDSC/Builders.h b/mlir/include/mlir/EDSC/Builders.h index 1f21af6..70c948d 100644 --- a/mlir/include/mlir/EDSC/Builders.h +++ b/mlir/include/mlir/EDSC/Builders.h @@ -190,7 +190,7 @@ public: TemplatedIndexedValue operator()(Value index, Args... indices) { return TemplatedIndexedValue(value, index).append(indices...); } - TemplatedIndexedValue operator()(ArrayRef indices) { + TemplatedIndexedValue operator()(ValueRange indices) { return TemplatedIndexedValue(value, indices); } @@ -319,7 +319,7 @@ public: } private: - TemplatedIndexedValue(Value value, ArrayRef indices) + TemplatedIndexedValue(Value value, ValueRange indices) : value(value), indices(indices.begin(), indices.end()) {} TemplatedIndexedValue &append() { return *this; } -- 2.7.4