From a4755c50c37636db1f39097e607592487d4eed29 Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Date: Sun, 19 Apr 2020 23:52:21 +0000 Subject: [PATCH] Clean up extraneous buffer. --- passes/techmap/techmap.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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(); -- 2.30.2