Skip to content

Commit e515f26

Browse files
committed
List all candidate functions for a function pointer at debug verbosity
1 parent 9717af2 commit e515f26

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/goto-programs/remove_function_pointers.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,25 @@ void remove_function_pointerst::remove_function_pointer(
430430
statistics().source_location=target->source_location;
431431
statistics() << "replacing function pointer by "
432432
<< functions.size() << " possible targets" << eom;
433+
434+
// list the names of functions when verbosity is at debug level
435+
conditional_output(
436+
debug(),
437+
[this, &functions](mstreamt &mstream) {
438+
mstream << "targets: ";
439+
440+
bool first = true;
441+
for(const auto &function : functions)
442+
{
443+
if(!first)
444+
mstream << ", ";
445+
446+
mstream << function.get_identifier();
447+
first = false;
448+
}
449+
450+
mstream << eom;
451+
});
433452
}
434453

435454
bool remove_function_pointerst::remove_function_pointers(

0 commit comments

Comments
 (0)