llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-mlir Author: Lin-Ya Yu (yu810226) <details> <summary>Changes</summary> This PR backports the change from commit 77f256070f985029a53da5e76ecd85ca7686a7ea on `main` to `release/21.x`. Only mlir/include/mlir/IR/Properties.td is affected. Original commit: https://github.com/llvm/llvm-project/commit/77f256070f985029a53da5e76ecd85ca7686a7ea (cherry picked manually) --- Full diff: https://github.com/llvm/llvm-project/pull/165768.diff 1 Files Affected: - (modified) mlir/include/mlir/IR/Properties.td (+4-3) ``````````diff 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<Property p, bit canDelegateParsing = 1> }]; 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>{}] # `````````` </details> https://github.com/llvm/llvm-project/pull/165768 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
