[mlir] Add constBuilderCall to DictionaryAttr
authorEugene Zhulenev <ezhulenev@google.com>
Wed, 28 Dec 2022 20:45:17 +0000 (12:45 -0800)
committerEugene Zhulenev <ezhulenev@google.com>
Thu, 29 Dec 2022 20:30:22 +0000 (12:30 -0800)
Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D140740

mlir/include/mlir/IR/OpBase.td

index a14c891..3b3d4fd 100644 (file)
@@ -1292,6 +1292,7 @@ def UnitAttr : Attr<CPred<"$_self.isa<::mlir::UnitAttr>()">, "unit attribute"> {
 class DictionaryAttrBase<Pred condition, string summary> :
     Attr<condition, summary> {
   let storageType = [{ ::mlir::DictionaryAttr }];
+  let constBuilderCall = "$_builder.getDictionaryAttr($0)";
   let returnType = [{ ::mlir::DictionaryAttr }];
   let valueType = NoneType;
   let convertFromStorage = "$_self";