Skip to content

Commit 89048e6

Browse files
committed
Function-pointer remvoval: print human-friendly debug messages
1 parent 072b592 commit 89048e6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/goto-programs/remove_const_function_pointers.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ Author: Thomas Kiley, [email protected]
1212
#include "remove_const_function_pointers.h"
1313

1414
#include <util/arith_tools.h>
15+
#include <util/format_expr.h>
1516
#include <util/simplify_expr.h>
1617
#include <util/std_expr.h>
1718
#include <util/symbol_table.h>
1819

1920
#include "goto_functions.h"
2021

2122
#define LOG(message, irep) \
22-
debug() << "Case " << __LINE__ << " : " << message << "\n" \
23-
<< irep.pretty() << eom;
23+
do { \
24+
debug().source_location = irep.source_location(); \
25+
debug() << message << ": " << format(irep) << eom; \
26+
} \
27+
while(0)
2428

2529
/// To take a function call on a function pointer, and if possible resolve it to
2630
/// a small collection of possible values.

0 commit comments

Comments
 (0)