aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorN. Engelhardt <nak@symbioticeda.com>2020-03-16 13:49:10 +0100
committerGitHub <noreply@github.com>2020-03-16 13:49:10 +0100
commit020f6d167aa92e94e9ae70a8fb15b861c528e76d (patch)
treef0ddd076e6ad985a85beb47766f0f1edf0734204 /backends
parenta2e340de435a6cfeeeb18dc23236cc550be8ca1a (diff)
parent07f0874779226dd066661d100783d21b1f9ad721 (diff)
downloadyosys-020f6d167aa92e94e9ae70a8fb15b861c528e76d.tar.gz
yosys-020f6d167aa92e94e9ae70a8fb15b861c528e76d.tar.bz2
yosys-020f6d167aa92e94e9ae70a8fb15b861c528e76d.zip
Merge pull request #1768 from boqwxp/smt2_cleanup
Clean up pseudo-private member usage in `backends/smt2/smt2.cc`.
Diffstat (limited to 'backends')
-rw-r--r--backends/smt2/smt2.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc
index 3e08ce37b..ea252b6b9 100644
--- a/backends/smt2/smt2.cc
+++ b/backends/smt2/smt2.cc
@@ -1508,11 +1508,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