diff --git a/mlir/include/mlir/IR/Properties.td b/mlir/include/mlir/IR/Properties.td index a6221f9aaaef9..a7ade0675b9bb 100644 --- a/mlir/include/mlir/IR/Properties.td +++ b/mlir/include/mlir/IR/Properties.td @@ -773,9 +773,10 @@ class OptionalProp }]; let writeToMlirBytecode = [{ $_writer.writeOwnedBool($_storage.has_value()); - if (!$_storage.has_value()) - return; - }] # !subst("$_storage", "(*($_storage))", p.writeToMlirBytecode); + if ($_storage.has_value()) { + }] # !subst("$_storage", "(*($_storage))", p.writeToMlirBytecode) # [{ + } + }]; let hashProperty = !if(!empty(p.hashProperty), p.hashProperty, [{ hash_value($_storage.has_value() ? std::optional<::llvm::hash_code>{}] #