Skip to content

Commit 37fe40d

Browse files
author
martin
committed
Add utility function for remove_unreachable.
1 parent 4d15a3e commit 37fe40d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/goto-programs/remove_unreachable.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@ void remove_unreachable(goto_programt &goto_program)
5555
it->make_skip();
5656
}
5757
}
58+
59+
void remove_unreachable(goto_functionst &goto_functions)
60+
{
61+
Forall_goto_functions(f_it, goto_functions)
62+
remove_unreachable(f_it->second.body);
63+
}
64+

src/goto-programs/remove_unreachable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ Author: Daniel Kroening, [email protected]
1212
#include "goto_functions.h"
1313

1414
void remove_unreachable(goto_programt &goto_program);
15+
void remove_unreachable(goto_functionst &goto_functions);
1516

1617
#endif // CPROVER_GOTO_PROGRAMS_REMOVE_UNREACHABLE_H

0 commit comments

Comments
 (0)