Clean up pseudo-private member usage in `backends/smt2/smt2.cc`.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Fri, 13 Mar 2020 21:49:12 +0000 (21:49 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Fri, 13 Mar 2020 21:49:12 +0000 (21:49 +0000)
backends/smt2/smt2.cc

index 081dcda999afe06411a48c90166b9a1ce1fa60b1..e693ccf9d281ed7567a6e18a0860a038f99bd7b2 100644 (file)
@@ -1500,11 +1500,11 @@ struct Smt2Backend : public Backend {
 
                // extract module dependencies
                std::map<RTLIL::Module*, std::set<RTLIL::Module*>> module_deps;
-               for (auto &mod_it : design->modules_) {
-                       module_deps[mod_it.second] = std::set<RTLIL::Module*>();
-                       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<RTLIL::Module*>();
+                       for (auto cell : mod->cells())
+                               if (design->has(cell->type))
+                                       module_deps[mod].insert(design->module(cell->type));
                }
 
                // simple good-enough topological sort