diff --git a/mlir/include/mlir/IR/Attributes.h b/mlir/include/mlir/IR/Attributes.h --- a/mlir/include/mlir/IR/Attributes.h +++ b/mlir/include/mlir/IR/Attributes.h @@ -213,6 +213,7 @@ iterator begin() const { return getValue().begin(); } iterator end() const { return getValue().end(); } size_t size() const { return getValue().size(); } + bool empty() const { return size() == 0; } /// Methods for support type inquiry through isa, cast, and dyn_cast. static bool kindof(unsigned kind) {