@@ -170,7 +170,11 @@ goto_programt::const_targett goto_program2codet::convert_instruction(
170170 return target;
171171
172172 case FUNCTION_CALL:
173- dest.add (target->get_function_call ());
173+ {
174+ code_function_callt call (
175+ target->call_lhs (), target->call_function (), target->call_arguments ());
176+ dest.add (call);
177+ }
174178 return target;
175179
176180 case OTHER:
@@ -465,8 +469,7 @@ goto_programt::const_targett goto_program2codet::convert_decl(
465469 !next->is_target () &&
466470 (next->is_assign () || next->is_function_call ()))
467471 {
468- exprt lhs =
469- next->is_assign () ? next->assign_lhs () : next->get_function_call ().lhs ();
472+ exprt lhs = next->is_assign () ? next->assign_lhs () : next->call_lhs ();
470473 if (lhs==symbol &&
471474 va_list_expr.find (lhs)==va_list_expr.end ())
472475 {
@@ -477,9 +480,11 @@ goto_programt::const_targett goto_program2codet::convert_decl(
477480 else
478481 {
479482 // could hack this by just erasing the first operand
480- const code_function_callt &f = next->get_function_call ();
481483 side_effect_expr_function_callt call (
482- f.function (), f.arguments (), typet{}, source_locationt{});
484+ next->call_function (),
485+ next->call_arguments (),
486+ typet{},
487+ source_locationt{});
483488 d.copy_to_operands (call);
484489 }
485490
@@ -1299,15 +1304,16 @@ goto_programt::const_targett goto_program2codet::convert_start_thread(
12991304 thread_start->call_arguments ().size () == 1 &&
13001305 after_thread_start == thread_end)
13011306 {
1302- const code_function_callt &cf = thread_start->get_function_call ();
1303-
13041307 system_headers.insert (" pthread.h" );
13051308
13061309 const null_pointer_exprt n (pointer_type (empty_typet ()));
13071310 dest.add (code_function_callt (
1308- cf. lhs (),
1311+ thread_start-> call_lhs (),
13091312 symbol_exprt (" pthread_create" , code_typet ({}, empty_typet ())),
1310- {n, n, cf.function (), cf.arguments ().front ()}));
1313+ {n,
1314+ n,
1315+ thread_start->call_function (),
1316+ thread_start->call_arguments ().front ()}));
13111317
13121318 return thread_end;
13131319 }
0 commit comments