From 75bb2c8c2472f4f09c556c09ae0ac3fb6a70d41a Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 14 Apr 2020 10:43:05 -0700 Subject: [PATCH] design: do not delete when iterating over Design::modules() directly --- passes/cmds/design.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passes/cmds/design.cc b/passes/cmds/design.cc index 4612760cc..8861182aa 100644 --- a/passes/cmds/design.cc +++ b/passes/cmds/design.cc @@ -340,7 +340,7 @@ struct DesignPass : public Pass { if (reset_mode || !load_name.empty() || push_mode || pop_mode) { - for (auto mod : design->modules()) + for (auto mod : design->modules().to_vector()) design->remove(mod); design->selection_stack.clear(); -- 2.30.2