From 906155769284028ab17b748be9fac7ca0e0cb0a5 Mon Sep 17 00:00:00 2001 From: Joren Dumoulin Date: Tue, 7 Jan 2025 16:43:59 +0100 Subject: [PATCH] backend: (csl) use iter_attrs method for DenseIntOrFPElementsArray to become unaffected by the representation changes --- xdsl/backend/csl/print_csl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xdsl/backend/csl/print_csl.py b/xdsl/backend/csl/print_csl.py index ae06f770b5..00d604fda1 100644 --- a/xdsl/backend/csl/print_csl.py +++ b/xdsl/backend/csl/print_csl.py @@ -452,8 +452,8 @@ def attribute_value_to_str(self, attr: Attribute) -> str: return str(val.data) case StringAttr() as s: return f'"{s.data}"' - case DenseIntOrFPElementsAttr(data=data, type=typ): - return f"{self.mlir_type_to_csl_type(typ)} {{ {', '.join(self.attribute_value_to_str(d) for d in data)} }}" + case DenseIntOrFPElementsAttr(type=typ): + return f"{self.mlir_type_to_csl_type(typ)} {{ {', '.join(self.attribute_value_to_str(a) for a in attr.iter_attrs())} }}" case _: return f""