diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-19 09:20:31 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-19 09:20:31 -0700 |
commit | 4e8f0fbce84db96f8cd3d4e1594b30cbc8ec1020 (patch) | |
tree | cc2140e0a0b97196c101535af9834d1d7cbfe194 /kernel/rtlil.cc | |
parent | e5aa3feb1bb3e35907a9e43f1fefdfdc6c7b09e4 (diff) | |
parent | 7324a4c2cd0132f792f4fade1a77aeceae46bd85 (diff) | |
download | yosys-4e8f0fbce84db96f8cd3d4e1594b30cbc8ec1020.tar.gz yosys-4e8f0fbce84db96f8cd3d4e1594b30cbc8ec1020.tar.bz2 yosys-4e8f0fbce84db96f8cd3d4e1594b30cbc8ec1020.zip |
Merge branch 'xaig' into xc7mux
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index f732b56b0..3990ec283 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1565,21 +1565,14 @@ void RTLIL::Module::remove(const pool<RTLIL::Wire*> &wires) void RTLIL::Module::remove(RTLIL::Cell *cell) { - auto it = cells_.find(cell->name); - log_assert(it != cells_.end()); - remove(it); -} - -dict<RTLIL::IdString, RTLIL::Cell*>::iterator RTLIL::Module::remove(dict<RTLIL::IdString, RTLIL::Cell*>::iterator it) -{ - RTLIL::Cell *cell = it->second; while (!cell->connections_.empty()) cell->unsetPort(cell->connections_.begin()->first); + auto it = cells_.find(cell->name); + log_assert(it != cells_.end()); log_assert(refcount_cells_ == 0); - it = cells_.erase(it); + cells_.erase(it); delete cell; - return it; } void RTLIL::Module::rename(RTLIL::Wire *wire, RTLIL::IdString new_name) |