sv_binutils: do not index array entries
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 4 May 2022 16:02:57 +0000 (16:02 +0000)
committerDmitry Selyutin <ghostmansd@gmail.com>
Wed, 4 May 2022 16:02:57 +0000 (16:02 +0000)
src/openpower/sv/sv_binutils.py

index cf2f7e4b8fc8c8923a54e47f008839de4b3996f4..6bd7c2ebff741d507ea55a3f1d773873d33e9441 100644 (file)
@@ -121,7 +121,7 @@ class Array(CType, tuple, metaclass=ArrayMeta, type=CType, size=...):
     def c_value(self, *, prefix="", suffix="", **kwargs):
         yield f"{prefix}{{"
         for (index, item) in enumerate(self):
-            yield from indent(item.c_value(prefix=f"[{index}] = ", suffix=","))
+            yield from indent(item.c_value(suffix=","))
         yield f"}}{suffix}"