Skip to content

Commit cfb733a

Browse files
committed
Make remove_skip call goto_program.update()
All invocations of remove_skip do this immediately after calling remove_skip, which just complicates the protocol of using remove_skip.
1 parent 91d47c2 commit cfb733a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/goto-programs/remove_skip.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,18 @@ void remove_skip(goto_programt &goto_program)
172172
goto_program,
173173
goto_program.instructions.begin(),
174174
goto_program.instructions.end());
175+
176+
goto_program.update();
175177
}
176178

177179
/// remove unnecessary skip statements
178180
void remove_skip(goto_functionst &goto_functions)
179181
{
180182
Forall_goto_functions(f_it, goto_functions)
181-
remove_skip(f_it->second.body);
183+
remove_skip(
184+
f_it->second.body,
185+
f_it->second.body.instructions.begin(),
186+
f_it->second.body.instructions.end());
182187

183188
// we may remove targets
184189
goto_functions.update();
@@ -188,4 +193,3 @@ void remove_skip(goto_modelt &goto_model)
188193
{
189194
remove_skip(goto_model.goto_functions);
190195
}
191-

0 commit comments

Comments
 (0)