From: Alberto Gonzalez Date: Sun, 19 Apr 2020 23:52:21 +0000 (+0000) Subject: Clean up extraneous buffer. X-Git-Tag: working-ls180~517^2~14 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a4755c50c37636db1f39097e607592487d4eed29;p=yosys.git Clean up extraneous buffer. --- diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index a915f207d..6b0957ad7 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -1423,14 +1423,11 @@ struct FlattenPass : public Pass { new_used_modules.insert(cell->type); } - std::set to_remove; - for (auto mod : design->modules()) + for (auto mod : design->modules().to_vector()) if (!used_modules[mod->name] && !mod->get_blackbox_attribute(worker.ignore_wb)) { log("Deleting now unused module %s.\n", log_id(mod)); - to_remove.insert(mod); + design->remove(mod); } - for (auto mod : to_remove) - design->remove(mod); } log_pop();