diff options
| -rw-r--r-- | mlir/include/mlir/IR/Attributes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h index dabcdb494f3..3aa020f4af8 100644 --- a/mlir/include/mlir/IR/Attributes.h +++ b/mlir/include/mlir/IR/Attributes.h @@ -222,6 +222,12 @@ public: ArrayRef<Attribute> getValue() const; + size_t size() const { return getValue().size(); } + + using iterator = llvm::ArrayRef<Attribute>::iterator; + iterator begin() const { return getValue().begin(); } + iterator end() const { return getValue().end(); } + /// Methods for support type inquiry through isa, cast, and dyn_cast. static bool kindof(Kind kind) { return kind == Kind::Array; } }; |

