https://github.com/yu810226 created https://github.com/llvm/llvm-project/pull/165768
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) >From a0f6aee8d318558e74471dc5e75a41d1bfca9b62 Mon Sep 17 00:00:00 2001 From: yu810226 <[email protected]> Date: Thu, 30 Oct 2025 11:49:01 -0700 Subject: [PATCH] [Backport][MLIR] Properties.td fix from main commit 77f2560 --- mlir/include/mlir/IR/Properties.td | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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>{}] # _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
