30
30
#include " compute_called_functions.h"
31
31
#include " remove_const_function_pointers.h"
32
32
33
- class remove_function_pointerst : public messaget
33
+ class remove_function_pointerst
34
34
{
35
35
public:
36
36
remove_function_pointerst (
@@ -59,6 +59,7 @@ class remove_function_pointerst:public messaget
59
59
const functionst &functions);
60
60
61
61
protected:
62
+ messaget log;
62
63
const namespacet ns;
63
64
symbol_tablet &symbol_table;
64
65
bool add_safety_assertion;
@@ -114,7 +115,7 @@ remove_function_pointerst::remove_function_pointerst(
114
115
symbol_tablet &_symbol_table,
115
116
bool _add_safety_assertion, bool only_resolve_const_fps,
116
117
const goto_functionst &goto_functions):
117
- messaget (_message_handler),
118
+ log (_message_handler),
118
119
ns(_symbol_table),
119
120
symbol_table(_symbol_table),
120
121
add_safety_assertion(_add_safety_assertion),
@@ -304,15 +305,16 @@ void remove_function_pointerst::remove_function_pointer(
304
305
const auto does_remove_const = const_removal_check ();
305
306
if (does_remove_const.first )
306
307
{
307
- warning ().source_location = does_remove_const.second ;
308
- warning () << " cast from const to non-const pointer found, only worst case"
309
- << " function pointer removal will be done." << eom;
308
+ log .warning ().source_location = does_remove_const.second ;
309
+ log .warning () << " cast from const to non-const pointer found, "
310
+ << " only worst case function pointer removal will be done."
311
+ << messaget::eom;
310
312
found_functions=false ;
311
313
}
312
314
else
313
315
{
314
316
remove_const_function_pointerst fpr (
315
- get_message_handler (), ns, symbol_table);
317
+ log . get_message_handler (), ns, symbol_table);
316
318
317
319
found_functions=fpr (pointer, functions);
318
320
@@ -455,14 +457,15 @@ void remove_function_pointerst::remove_function_pointer(
455
457
target->type =OTHER;
456
458
457
459
// report statistics
458
- statistics ().source_location =target->source_location ;
459
- statistics () << " replacing function pointer by "
460
- << functions.size () << " possible targets" << eom;
460
+ log .statistics ().source_location =target->source_location ;
461
+ log .statistics () << " replacing function pointer by "
462
+ << functions.size () << " possible targets"
463
+ << messaget::eom;
461
464
462
465
// list the names of functions when verbosity is at debug level
463
- conditional_output (
464
- debug (),
465
- [&functions](mstreamt &mstream) {
466
+ log . conditional_output (
467
+ log . debug (),
468
+ [&functions](messaget:: mstreamt &mstream) {
466
469
mstream << " targets: " ;
467
470
468
471
bool first = true ;
@@ -475,7 +478,7 @@ void remove_function_pointerst::remove_function_pointer(
475
478
first = false ;
476
479
}
477
480
478
- mstream << eom;
481
+ mstream << messaget:: eom;
479
482
});
480
483
}
481
484
0 commit comments