@@ -247,24 +247,31 @@ goto_programt::targett remove_virtual_functionst::remove_virtual_function(
247
247
// Only create one call sequence per possible target:
248
248
if (insertit.second )
249
249
{
250
- goto_programt::targett t1=new_code_calls.add_instruction ();
251
250
if (fun.symbol_expr .has_value ())
252
251
{
253
252
// call function
254
- *t1 = goto_programt::make_function_call (code, vcall_source_loc);
253
+ goto_programt::targett t1 = new_code_calls.add (
254
+ goto_programt::make_function_call (code, vcall_source_loc));
255
+
255
256
create_static_function_call (
256
257
t1->get_function_call (), *fun.symbol_expr , ns);
258
+
259
+ insertit.first ->second = t1;
257
260
}
258
261
else
259
262
{
263
+ goto_programt::targett t1 = new_code_calls.add (
264
+ goto_programt::make_assertion (false_exprt (), vcall_source_loc));
265
+
260
266
// No definition for this type; shouldn't be possible...
261
- *t1 = goto_programt::make_assertion (false_exprt (), vcall_source_loc);
262
267
t1->source_location .set_comment (
263
268
" cannot find calls for " +
264
269
id2string (code.function ().get (ID_identifier)) + " dispatching " +
265
270
id2string (fun.class_id ));
271
+
272
+ insertit.first ->second = t1;
266
273
}
267
- insertit. first -> second =t1;
274
+
268
275
// goto final
269
276
new_code_calls.add (
270
277
goto_programt::make_goto (t_final, true_exprt (), vcall_source_loc));
0 commit comments