File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -196,8 +196,14 @@ Function: smv_typecheckt::flatten_hierarchy
196196
197197void smv_typecheckt::flatten_hierarchy (smv_parse_treet::modulet &smv_module)
198198{
199- for (auto &element : smv_module.elements )
199+ // Not using ranged for since we will append to the list we are
200+ // iterating over! This avoids recursion.
201+ for (auto element_it = smv_module.elements .begin ();
202+ element_it != smv_module.elements .end ();
203+ ++element_it)
200204 {
205+ auto &element = *element_it;
206+
201207 if (element.is_var () && element.expr .type ().id () == ID_smv_submodule)
202208 {
203209 exprt &inst =
@@ -238,6 +244,7 @@ void smv_typecheckt::instantiate(
238244 const exprt::operandst &operands,
239245 const source_locationt &location)
240246{
247+ #if 0
241248 symbol_table_baset::symbolst::const_iterator s_it =
242249 symbol_table.symbols.find(identifier);
243250
@@ -373,7 +380,7 @@ void smv_typecheckt::instantiate(
373380 instantiate_rename(tmp, rename_map);
374381 smv_module.add_trans(tmp);
375382 }
376-
383+ # endif
377384}
378385
379386/* ******************************************************************\
You can’t perform that action at this time.
0 commit comments