Add missing function_id to `remove_returns` INVARIANT

This makes it easier to track down exactly why this INVARIANT was
violated, if that problem occurs.
This commit is contained in:
Thomas Spriggs 2019-09-03 11:17:24 +01:00
parent ca6e2a82f3
commit a10ffcb1c8
1 changed files with 2 additions and 1 deletions

View File

@ -224,7 +224,8 @@ void remove_returnst::operator()(goto_functionst &goto_functions)
auto findit = goto_functions.function_map.find(function_id);
INVARIANT(
findit != goto_functions.function_map.end(),
"called function should have some entry in the function map");
"called function `" + id2string(function_id) +
"' should have an entry in the function map");
return !findit->second.body_available();
};