Skip to content

Commit a2b67a8

Browse files
jdiff_parse_options is not a message
In addition the class already inherits a log field of type messaget.
1 parent 23db0a5 commit a2b67a8

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

jbmc/src/jdiff/jdiff_parse_options.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Author: Peter Schrammel
6363

6464
jdiff_parse_optionst::jdiff_parse_optionst(int argc, const char **argv)
6565
: parse_options_baset(JDIFF_OPTIONS, argc, argv, ui_message_handler),
66-
messaget(ui_message_handler),
6766
ui_message_handler(cmdline, std::string("JDIFF ") + CBMC_VERSION)
6867
{
6968
}
@@ -186,19 +185,19 @@ int jdiff_parse_optionst::doit()
186185

187186
optionst options;
188187
get_command_line_options(options);
189-
eval_verbosity(
188+
messaget::eval_verbosity(
190189
cmdline.get_value("verbosity"), messaget::M_STATISTICS, ui_message_handler);
191190

192191
//
193192
// Print a banner
194193
//
195-
status() << "JDIFF version " << CBMC_VERSION << " " << sizeof(void *) * 8
194+
log.status() << "JDIFF version " << CBMC_VERSION << " " << sizeof(void *) * 8
196195
<< "-bit " << config.this_architecture() << " "
197-
<< config.this_operating_system() << eom;
196+
<< config.this_operating_system() << messaget::eom;
198197

199198
if(cmdline.args.size() != 2)
200199
{
201-
error() << "Please provide two programs to compare" << eom;
200+
log.error() << "Please provide two programs to compare" << messaget::eom;
202201
return CPROVER_EXIT_INCORRECT_TASK;
203202
}
204203

@@ -226,12 +225,12 @@ int jdiff_parse_optionst::doit()
226225
{
227226
show_goto_functions(
228227
goto_model1,
229-
get_message_handler(),
228+
log.get_message_handler(),
230229
ui_message_handler.get_ui(),
231230
cmdline.isset("list-goto-functions"));
232231
show_goto_functions(
233232
goto_model2,
234-
get_message_handler(),
233+
log.get_message_handler(),
235234
ui_message_handler.get_ui(),
236235
cmdline.isset("list-goto-functions"));
237236
return CPROVER_EXIT_SUCCESS;
@@ -275,20 +274,20 @@ bool jdiff_parse_optionst::process_goto_program(
275274
{
276275
{
277276
// remove function pointers
278-
status() << "Removing function pointers and virtual functions" << eom;
277+
log.status() << "Removing function pointers and virtual functions" << messaget::eom;
279278
remove_function_pointers(
280-
get_message_handler(), goto_model, cmdline.isset("pointer-check"));
279+
log.get_message_handler(), goto_model, cmdline.isset("pointer-check"));
281280

282281
// Java virtual functions -> explicit dispatch tables:
283282
remove_virtual_functions(goto_model);
284283

285284
// remove Java throw and catch
286285
// This introduces instanceof, so order is important:
287-
remove_exceptions_using_instanceof(goto_model, get_message_handler());
286+
remove_exceptions_using_instanceof(goto_model, log.get_message_handler());
288287

289288
// Java instanceof -> clsid comparison:
290289
class_hierarchyt class_hierarchy(goto_model.symbol_table);
291-
remove_instanceof(goto_model, class_hierarchy, get_message_handler());
290+
remove_instanceof(goto_model, class_hierarchy, log.get_message_handler());
292291

293292
mm_io(goto_model);
294293

@@ -302,7 +301,7 @@ bool jdiff_parse_optionst::process_goto_program(
302301
rewrite_union(goto_model);
303302

304303
// add generic checks
305-
status() << "Generic Property Instrumentation" << eom;
304+
log.status() << "Generic Property Instrumentation" << messaget::eom;
306305
goto_check(options, goto_model);
307306

308307
// checks don't know about adjusted float expressions
@@ -322,9 +321,9 @@ bool jdiff_parse_optionst::process_goto_program(
322321
if(cmdline.isset("cover"))
323322
{
324323
const auto cover_config = get_cover_config(
325-
options, goto_model.symbol_table, get_message_handler());
324+
options, goto_model.symbol_table, log.get_message_handler());
326325
if(instrument_cover_goals(
327-
cover_config, goto_model, get_message_handler()))
326+
cover_config, goto_model, log.get_message_handler()))
328327
return true;
329328
}
330329

jbmc/src/jdiff/jdiff_parse_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class goto_modelt;
4040
"(compact-output)"
4141
// clang-format on
4242

43-
class jdiff_parse_optionst : public parse_options_baset, public messaget
43+
class jdiff_parse_optionst : public parse_options_baset
4444
{
4545
public:
4646
virtual int doit();

0 commit comments

Comments
 (0)