Skip to content

Commit

Permalink
List all candidate functions for a function pointer at debug verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Jun 4, 2018
1 parent 9717af2 commit e515f26
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/goto-programs/remove_function_pointers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,25 @@ void remove_function_pointerst::remove_function_pointer(
statistics().source_location=target->source_location;
statistics() << "replacing function pointer by "
<< functions.size() << " possible targets" << eom;

// list the names of functions when verbosity is at debug level
conditional_output(
debug(),
[this, &functions](mstreamt &mstream) {
mstream << "targets: ";

bool first = true;
for(const auto &function : functions)
{
if(!first)
mstream << ", ";

mstream << function.get_identifier();
first = false;
}

mstream << eom;
});
}

bool remove_function_pointerst::remove_function_pointers(
Expand Down

0 comments on commit e515f26

Please sign in to comment.