From: Alberto Gonzalez Date: Fri, 13 Mar 2020 21:49:12 +0000 (+0000) Subject: Clean up pseudo-private member usage in `backends/smt2/smt2.cc`. X-Git-Tag: working-ls180~748^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07f0874779226dd066661d100783d21b1f9ad721;p=yosys.git Clean up pseudo-private member usage in `backends/smt2/smt2.cc`. --- diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index 081dcda99..e693ccf9d 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -1500,11 +1500,11 @@ struct Smt2Backend : public Backend { // extract module dependencies std::map> module_deps; - for (auto &mod_it : design->modules_) { - module_deps[mod_it.second] = std::set(); - for (auto &cell_it : mod_it.second->cells_) - if (design->modules_.count(cell_it.second->type) > 0) - module_deps[mod_it.second].insert(design->modules_.at(cell_it.second->type)); + for (auto mod : design->modules()) { + module_deps[mod] = std::set(); + for (auto cell : mod->cells()) + if (design->has(cell->type)) + module_deps[mod].insert(design->module(cell->type)); } // simple good-enough topological sort