diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-28 11:09:42 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-28 11:09:42 -0700 |
commit | 4ef26d4755d355e562a173c86d3eace100a266fe (patch) | |
tree | 6d331a5b3fa83d9072c25f7825cacb4e3d30cea5 /kernel | |
parent | 1c79a32276ef4ae3601cb75e0ab05ba1afe4d385 (diff) | |
parent | da5f83039527bf50af001671744f351988c3261a (diff) | |
download | yosys-4ef26d4755d355e562a173c86d3eace100a266fe.tar.gz yosys-4ef26d4755d355e562a173c86d3eace100a266fe.tar.bz2 yosys-4ef26d4755d355e562a173c86d3eace100a266fe.zip |
Merge remote-tracking branch 'origin/master' into xc7mux
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/celltypes.h | 9 | ||||
-rw-r--r-- | kernel/rtlil.cc | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/kernel/celltypes.h b/kernel/celltypes.h index 4e91eddda..758661c02 100644 --- a/kernel/celltypes.h +++ b/kernel/celltypes.h @@ -246,24 +246,24 @@ struct CellTypes cell_types.clear(); } - bool cell_known(RTLIL::IdString type) + bool cell_known(RTLIL::IdString type) const { return cell_types.count(type) != 0; } - bool cell_output(RTLIL::IdString type, RTLIL::IdString port) + bool cell_output(RTLIL::IdString type, RTLIL::IdString port) const { auto it = cell_types.find(type); return it != cell_types.end() && it->second.outputs.count(port) != 0; } - bool cell_input(RTLIL::IdString type, RTLIL::IdString port) + bool cell_input(RTLIL::IdString type, RTLIL::IdString port) const { auto it = cell_types.find(type); return it != cell_types.end() && it->second.inputs.count(port) != 0; } - bool cell_evaluable(RTLIL::IdString type) + bool cell_evaluable(RTLIL::IdString type) const { auto it = cell_types.find(type); return it != cell_types.end() && it->second.is_evaluable; @@ -482,4 +482,3 @@ extern CellTypes yosys_celltypes; YOSYS_NAMESPACE_END #endif - diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 94dbf31c0..a09f4a0d1 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1595,10 +1595,9 @@ void RTLIL::Module::remove(RTLIL::Cell *cell) while (!cell->connections_.empty()) cell->unsetPort(cell->connections_.begin()->first); - auto it = cells_.find(cell->name); - log_assert(it != cells_.end()); + log_assert(cells_.count(cell->name) != 0); log_assert(refcount_cells_ == 0); - cells_.erase(it); + cells_.erase(cell->name); delete cell; } |