kernel: Design::remove(RTLIL::Module *) to check refcount_modules_
authorEddie Hung <eddie@fpgeh.com>
Tue, 14 Apr 2020 16:31:06 +0000 (09:31 -0700)
committerEddie Hung <eddie@fpgeh.com>
Tue, 14 Apr 2020 16:31:06 +0000 (09:31 -0700)
kernel/rtlil.cc

index d9003f28ce78faccfb53d609d938a608cbed0a46..3e27fdecd477a8bf6b1a8354a89e9ef41bb2d572 100644 (file)
@@ -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;
 }