[Mlir-commits] [mlir] [mlir, python] Fix case when `FuncOp.arg_attrs` is not set (PR #117188)
Maksim Levental
llvmlistbot at llvm.org
Fri Nov 22 09:34:06 PST 2024
================
@@ -105,6 +105,10 @@ def add_entry_block(self, arg_locs: Optional[Sequence[Location]] = None):
@property
def arg_attrs(self):
+ if ARGUMENT_ATTRIBUTE_NAME not in self.attributes:
+ self.attributes[ARGUMENT_ATTRIBUTE_NAME] = ArrayAttr.get(
----------------
makslevental wrote:
I think it makes more sense to just return `None` here? I know it doesn't match the correct semantic but it seems odd to make empty dictionaries just to return them as empty?
https://github.com/llvm/llvm-project/pull/117188
More information about the Mlir-commits
mailing list