Skip to content

Commit af22270

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

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

jbmc/src/jdiff/jdiff_parse_options.cpp

Lines changed: 15 additions & 15 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
196-
<< "-bit " << config.this_architecture() << " "
197-
<< config.this_operating_system() << eom;
194+
log.status() << "JDIFF version " << CBMC_VERSION << " " << sizeof(void *) * 8
195+
<< "-bit " << config.this_architecture() << " "
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,21 @@ 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"
278+
<< messaget::eom;
279279
remove_function_pointers(
280-
get_message_handler(), goto_model, cmdline.isset("pointer-check"));
280+
log.get_message_handler(), goto_model, cmdline.isset("pointer-check"));
281281

282282
// Java virtual functions -> explicit dispatch tables:
283283
remove_virtual_functions(goto_model);
284284

285285
// remove Java throw and catch
286286
// This introduces instanceof, so order is important:
287-
remove_exceptions_using_instanceof(goto_model, get_message_handler());
287+
remove_exceptions_using_instanceof(goto_model, log.get_message_handler());
288288

289289
// Java instanceof -> clsid comparison:
290290
class_hierarchyt class_hierarchy(goto_model.symbol_table);
291-
remove_instanceof(goto_model, class_hierarchy, get_message_handler());
291+
remove_instanceof(goto_model, class_hierarchy, log.get_message_handler());
292292

293293
mm_io(goto_model);
294294

@@ -302,7 +302,7 @@ bool jdiff_parse_optionst::process_goto_program(
302302
rewrite_union(goto_model);
303303

304304
// add generic checks
305-
status() << "Generic Property Instrumentation" << eom;
305+
log.status() << "Generic Property Instrumentation" << messaget::eom;
306306
goto_check(options, goto_model);
307307

308308
// checks don't know about adjusted float expressions
@@ -322,9 +322,9 @@ bool jdiff_parse_optionst::process_goto_program(
322322
if(cmdline.isset("cover"))
323323
{
324324
const auto cover_config = get_cover_config(
325-
options, goto_model.symbol_table, get_message_handler());
325+
options, goto_model.symbol_table, log.get_message_handler());
326326
if(instrument_cover_goals(
327-
cover_config, goto_model, get_message_handler()))
327+
cover_config, goto_model, log.get_message_handler()))
328328
return true;
329329
}
330330

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)