Skip to content

Commit f075f24

Browse files
show_goto_functions takes a ui_message_handler
This removes the need for passing a seperate ui argument.
1 parent 5845d01 commit f075f24

File tree

9 files changed

+9
-22
lines changed

9 files changed

+9
-22
lines changed

jbmc/src/janalyzer/janalyzer_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ int janalyzer_parse_optionst::doit()
391391
show_goto_functions(
392392
goto_model,
393393
ui_message_handler,
394-
ui_message_handler.get_ui(),
395394
cmdline.isset("list-goto-functions"));
396395
return CPROVER_EXIT_SUCCESS;
397396
}

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,6 @@ int jbmc_parse_optionst::get_goto_program(
799799
show_goto_functions(
800800
*goto_model,
801801
ui_message_handler,
802-
ui_message_handler.get_ui(),
803802
cmdline.isset("list-goto-functions"));
804803
return 0;
805804
}
@@ -930,7 +929,6 @@ bool jbmc_parse_optionst::show_loaded_functions(
930929
show_goto_functions(
931930
ns,
932931
ui_message_handler,
933-
ui_message_handler.get_ui(),
934932
goto_model.get_goto_functions(),
935933
cmdline.isset("list-goto-functions"));
936934
return true;

jbmc/src/jdiff/jdiff_parse_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,10 @@ int jdiff_parse_optionst::doit()
229229
show_goto_functions(
230230
goto_model1,
231231
ui_message_handler,
232-
ui_message_handler.get_ui(),
233232
cmdline.isset("list-goto-functions"));
234233
show_goto_functions(
235234
goto_model2,
236235
ui_message_handler,
237-
ui_message_handler.get_ui(),
238236
cmdline.isset("list-goto-functions"));
239237
return CPROVER_EXIT_SUCCESS;
240238
}

src/cbmc/cbmc_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ int cbmc_parse_optionst::get_goto_program(
733733
show_goto_functions(
734734
goto_model,
735735
ui_message_handler,
736-
ui_message_handler.get_ui(),
737736
cmdline.isset("list-goto-functions"));
738737
return CPROVER_EXIT_SUCCESS;
739738
}

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ int goto_analyzer_parse_optionst::doit()
426426
show_goto_functions(
427427
goto_model,
428428
ui_message_handler,
429-
ui_message_handler.get_ui(),
430429
cmdline.isset("list-goto-functions"));
431430
return CPROVER_EXIT_SUCCESS;
432431
}

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,10 @@ int goto_diff_parse_optionst::doit()
267267
show_goto_functions(
268268
goto_model1,
269269
ui_message_handler,
270-
ui_message_handler.get_ui(),
271270
cmdline.isset("list-goto-functions"));
272271
show_goto_functions(
273272
goto_model2,
274273
ui_message_handler,
275-
ui_message_handler.get_ui(),
276274
cmdline.isset("list-goto-functions"));
277275
return CPROVER_EXIT_SUCCESS;
278276
}

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ int goto_instrument_parse_optionst::doit()
618618
show_goto_functions(
619619
goto_model,
620620
ui_message_handler,
621-
ui_message_handler.get_ui(),
622621
cmdline.isset("list-goto-functions"));
623622
return CPROVER_EXIT_SUCCESS;
624623
}

src/goto-programs/show_goto_functions.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ Author: Peter Schrammel
2525

2626
void show_goto_functions(
2727
const namespacet &ns,
28-
message_handlert &message_handler,
29-
ui_message_handlert::uit ui,
28+
ui_message_handlert &ui_message_handler,
3029
const goto_functionst &goto_functions,
3130
bool list_only)
3231
{
33-
messaget msg(message_handler);
32+
ui_message_handlert::uit ui = ui_message_handler.get_ui();
33+
messaget msg(ui_message_handler);
3434
switch(ui)
3535
{
3636
case ui_message_handlert::uit::XML_UI:
@@ -82,11 +82,10 @@ void show_goto_functions(
8282

8383
void show_goto_functions(
8484
const goto_modelt &goto_model,
85-
message_handlert &message_handler,
86-
ui_message_handlert::uit ui,
85+
ui_message_handlert &ui_message_handler,
8786
bool list_only)
8887
{
8988
const namespacet ns(goto_model.symbol_table);
9089
show_goto_functions(
91-
ns, message_handler, ui, goto_model.goto_functions, list_only);
90+
ns, ui_message_handler, goto_model.goto_functions, list_only);
9291
}

src/goto-programs/show_goto_functions.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ class goto_functionst;
3030

3131
void show_goto_functions(
3232
const namespacet &ns,
33-
message_handlert &message_handler,
34-
ui_message_handlert::uit ui,
33+
ui_message_handlert &ui_message_handler,
3534
const goto_functionst &goto_functions,
36-
bool list_only = false);
35+
bool list_only);
3736

3837
void show_goto_functions(
3938
const goto_modelt &,
40-
message_handlert &message_handler,
41-
ui_message_handlert::uit ui,
42-
bool list_only = false);
39+
ui_message_handlert &ui_message_handler,
40+
bool list_only);
4341

4442
#endif // CPROVER_GOTO_PROGRAMS_SHOW_GOTO_FUNCTIONS_H

0 commit comments

Comments
 (0)