back.rtlil: ignore empty source locations.
authorwhitequark <whitequark@whitequark.org>
Mon, 8 Jul 2019 09:33:01 +0000 (09:33 +0000)
committerwhitequark <whitequark@whitequark.org>
Mon, 8 Jul 2019 09:58:12 +0000 (09:58 +0000)
This was a bug introduced during refactoring in 2492f490.

nmigen/back/rtlil.py

index fc3bf1c7dfae9243565006d7b4ce46cee9ec769f..8c042c6fc8b5ea3d8fbc682b1bff31bed328ebec 100644 (file)
@@ -66,7 +66,7 @@ class _AttrBuilder:
     def _attributes(self, attrs, *, src=None, **kwargs):
         for name, value in attrs.items():
             self._attribute(name, value, **kwargs)
-        if src is not None:
+        if src:
             self._attribute("src", src, **kwargs)