Skip to content

Commit 4ec7ce4

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 83b756e commit 4ec7ce4

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
@@ -173,13 +173,18 @@ void remove_skip(goto_programt &goto_program)
173173
goto_program,
174174
goto_program.instructions.begin(),
175175
goto_program.instructions.end());
176+
177+
goto_program.update();
176178
}
177179

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

184189
// we may remove targets
185190
goto_functions.update();
@@ -189,4 +194,3 @@ void remove_skip(goto_modelt &goto_model)
189194
{
190195
remove_skip(goto_model.goto_functions);
191196
}
192-

0 commit comments

Comments
 (0)