[Mlir-commits] [mlir] a8ccf0e - [mlir][ods] Allow ArrayOfAttr implicit conversion to ArrayRef
Jeff Niu
llvmlistbot at llvm.org
Mon Dec 5 19:13:20 PST 2022
Author: Jeff Niu
Date: 2022-12-05T19:13:11-08:00
New Revision: a8ccf0ef5b7641899aae2d3f12a68d22ddbf5af8
URL: https://github.com/llvm/llvm-project/commit/a8ccf0ef5b7641899aae2d3f12a68d22ddbf5af8
DIFF: https://github.com/llvm/llvm-project/commit/a8ccf0ef5b7641899aae2d3f12a68d22ddbf5af8.diff
LOG: [mlir][ods] Allow ArrayOfAttr implicit conversion to ArrayRef
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D139372
Added:
Modified:
mlir/include/mlir/IR/AttrTypeBase.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/IR/AttrTypeBase.td b/mlir/include/mlir/IR/AttrTypeBase.td
index 99bf7cb07e38b..44d3b2412415c 100644
--- a/mlir/include/mlir/IR/AttrTypeBase.td
+++ b/mlir/include/mlir/IR/AttrTypeBase.td
@@ -431,6 +431,7 @@ class ArrayOfAttr<Dialect dialect, string attrName, string attrMnemonic,
auto &front() const { return getValue().front(); }
auto &back() const { return getValue().back(); }
auto &operator[](size_t index) { return getValue()[index]; }
+ operator }] # returnType # [{() const { return getValue(); }
}];
}
More information about the Mlir-commits
mailing list