File tree 1 file changed +4
-8
lines changed
src/goto-instrument/contracts
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -202,18 +202,14 @@ class goto_program_cfg_infot : public cfg_infot
202
202
explicit goto_program_cfg_infot (const goto_programt &goto_program)
203
203
{
204
204
// collect symbols declared in the insruction sequence as locals
205
- for (const auto &instruction : goto_program.instructions )
206
- {
207
- if (instruction.is_decl ())
208
- locals.insert (instruction.decl_symbol ().get_identifier ());
209
- }
205
+ goto_program.get_decl_identifiers (locals);
210
206
211
207
// collect dirty locals
212
208
goto_functiont goto_function;
213
209
goto_function.body .copy_from (goto_program);
214
210
215
211
dirtyt is_dirty (goto_function);
216
- auto dirty_ids = is_dirty.get_dirty_ids ();
212
+ const auto & dirty_ids = is_dirty.get_dirty_ids ();
217
213
dirty.insert (dirty_ids.begin (), dirty_ids.end ());
218
214
}
219
215
@@ -234,8 +230,8 @@ class goto_program_cfg_infot : public cfg_infot
234
230
}
235
231
236
232
protected:
237
- std::unordered_set <irep_idt> locals;
238
- std::unordered_set <irep_idt> dirty;
233
+ std::set <irep_idt> locals;
234
+ std::set <irep_idt> dirty;
239
235
};
240
236
241
237
#endif
You can’t perform that action at this time.
0 commit comments