From d04d8104c7426113e9dd20c9002db0411d7035dc Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Thu, 11 Jul 2024 12:05:03 +0200 Subject: [PATCH] rtlil: fix erase --- kernel/rtlil.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/rtlil.h b/kernel/rtlil.h index c0b686cc9..de4530b0e 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -1786,11 +1786,13 @@ public: throw std::out_of_range("FakeParams::size()"); } } - bool empty() const { - return !size(); - } + bool empty() const { return !size(); } // The need for this function implies setPort will be used on incompat types - void erase(const RTLIL::IdString& paramname) const { (void)paramname; } + void erase(const RTLIL::IdString ¶mname) const + { + if (parent->is_legacy()) + parent->legacy->parameters.erase(paramname); + } // The need for this function implies setPort will be used on incompat types void clear() const {} // AAA