File tree 4 files changed +6
-16
lines changed
4 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ void dep_graph_domaint::control_dependencies(
76
76
from->is_assume ())
77
77
control_deps.insert (from);
78
78
79
- const irep_idt id=goto_programt::get_function_id ( from) ;
79
+ const irep_idt id=from-> function ;
80
80
const cfg_post_dominatorst &pd=dep_graph.cfg_post_dominators ().at (id);
81
81
82
82
// check all candidates for M
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ void full_slicert::add_jumps(
150
150
continue ;
151
151
}
152
152
153
- const irep_idt id=goto_programt::get_function_id ( j.PC ) ;
153
+ const irep_idt id=j.PC -> function ;
154
154
const cfg_post_dominatorst &pd=post_dominators.at (id);
155
155
156
156
cfg_post_dominatorst::cfgt::entry_mapt::const_iterator e=
@@ -184,7 +184,7 @@ void full_slicert::add_jumps(
184
184
185
185
if (cfg[entry->second ].node_required )
186
186
{
187
- const irep_idt id2=goto_programt::get_function_id (*d_it);
187
+ const irep_idt id2=(*d_it)-> function ;
188
188
INVARIANT (id==id2,
189
189
" goto/jump expected to be within a single function" );
190
190
Original file line number Diff line number Diff line change @@ -386,21 +386,12 @@ class goto_program_templatet
386
386
return t;
387
387
}
388
388
389
- static const irep_idt get_function_id (
390
- const_targett l)
391
- {
392
- while (!l->is_end_function ())
393
- ++l;
394
-
395
- return l->function ;
396
- }
397
-
398
389
static const irep_idt get_function_id (
399
390
const goto_program_templatet<codeT, guardT> &p)
400
391
{
401
- assert (!p.empty ());
392
+ PRECONDITION (!p.empty ());
402
393
403
- return get_function_id (-- p.instructions .end ()) ;
394
+ return p.instructions .back (). function ;
404
395
}
405
396
406
397
template <typename Target>
Original file line number Diff line number Diff line change @@ -244,8 +244,7 @@ void remove_returnst::operator()(
244
244
if (goto_function.body .empty ())
245
245
return ;
246
246
247
- replace_returns (
248
- goto_programt::get_function_id (goto_function.body ), goto_function);
247
+ replace_returns (model_function.get_function_id (), goto_function);
249
248
do_function_calls (function_is_stub, goto_function.body );
250
249
}
251
250
You can’t perform that action at this time.
0 commit comments