@@ -44,7 +44,7 @@ class remove_returnst
44
44
const irep_idt &function_id,
45
45
goto_functionst::goto_functiont &function);
46
46
47
- bool do_function_calls (
47
+ void do_function_calls (
48
48
function_is_stubt function_is_stub,
49
49
goto_programt &goto_program);
50
50
@@ -142,14 +142,10 @@ void remove_returnst::replace_returns(
142
142
// / \param function_is_stub: function (irep_idt -> bool) that determines whether
143
143
// / a given function ID is a stub
144
144
// / \param goto_program: program to transform
145
- // / \return True if, and only if, instructions have been inserted. In that case
146
- // / the caller must invoke an appropriate method to update location numbers.
147
- bool remove_returnst::do_function_calls (
145
+ void remove_returnst::do_function_calls (
148
146
function_is_stubt function_is_stub,
149
147
goto_programt &goto_program)
150
148
{
151
- bool requires_update = false ;
152
-
153
149
Forall_goto_program_instructions (i_it, goto_program)
154
150
{
155
151
if (i_it->is_function_call ())
@@ -225,17 +221,13 @@ bool remove_returnst::do_function_calls(
225
221
t_a,
226
222
goto_programt::make_dead (*return_value, i_it->source_location ));
227
223
}
228
-
229
- requires_update = true ;
230
224
}
231
225
232
226
// update the call
233
227
i_it->set_function_call (function_call);
234
228
}
235
229
}
236
230
}
237
-
238
- return requires_update;
239
231
}
240
232
241
233
void remove_returnst::operator ()(goto_functionst &goto_functions)
@@ -252,8 +244,7 @@ void remove_returnst::operator()(goto_functionst &goto_functions)
252
244
};
253
245
254
246
replace_returns (it->first , it->second );
255
- if (do_function_calls (function_is_stub, it->second .body ))
256
- goto_functions.compute_location_numbers (it->second .body );
247
+ do_function_calls (function_is_stub, it->second .body );
257
248
}
258
249
}
259
250
@@ -270,8 +261,7 @@ void remove_returnst::operator()(
270
261
return ;
271
262
272
263
replace_returns (model_function.get_function_id (), goto_function);
273
- if (do_function_calls (function_is_stub, goto_function.body ))
274
- model_function.compute_location_numbers ();
264
+ do_function_calls (function_is_stub, goto_function.body );
275
265
}
276
266
277
267
// / removes returns
0 commit comments