From 635b2b8939f32a3551114332147a8323217f4474 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 14 Apr 2020 09:31:06 -0700 Subject: [PATCH] kernel: Design::remove(RTLIL::Module *) to check refcount_modules_ --- kernel/rtlil.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index d9003f28c..3e27fdecd 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -597,6 +597,7 @@ void RTLIL::Design::remove(RTLIL::Module *module) } log_assert(modules_.at(module->name) == module); + log_assert(refcount_modules_ == 0); modules_.erase(module->name); delete module; } -- 2.30.2