Skip to content

Commit 8157141

Browse files
smowtonpeterschrammel
authored andcommitted
Use function stub behaviour in single-function mode
Previously function stubs were only applied when static-analysis was called against a goto_functions object; they are now applied when it is called against a goto_programt as well.
1 parent 1c79841 commit 8157141

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/analyses/static_analysis.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,16 @@ void static_analysis_baset::do_function_call_rec(
509509
{
510510
// see if we have the functions at all
511511
if(goto_functions.function_map.empty())
512+
{
513+
if(function.id()==ID_symbol)
514+
{
515+
auto fid=function.get(ID_identifier);
516+
if(!should_enter_function(fid))
517+
transform_function_stub(function.get(ID_identifier),new_state,l_call,l_return);
518+
}
512519
return;
513-
520+
}
521+
514522
if(function.id()==ID_symbol)
515523
{
516524
const irep_idt &identifier=function.get(ID_identifier);

0 commit comments

Comments
 (0)