@@ -329,14 +329,11 @@ std::list<exprt> expressions_read(
329329 break ;
330330
331331 case FUNCTION_CALL:
332- {
333- const code_function_callt &function_call = instruction.get_function_call ();
334- for (const auto &argument : function_call.arguments ())
332+ for (const auto &argument : instruction.call_arguments ())
335333 dest.push_back (argument);
336- if (function_call. lhs ().is_not_nil ())
337- parse_lhs_read (function_call. lhs (), dest);
334+ if (instruction. call_lhs ().is_not_nil ())
335+ parse_lhs_read (instruction. call_lhs (), dest);
338336 break ;
339- }
340337
341338 case ASSIGN:
342339 dest.push_back (instruction.assign_rhs ());
@@ -371,12 +368,8 @@ std::list<exprt> expressions_written(
371368 switch (instruction.type )
372369 {
373370 case FUNCTION_CALL:
374- {
375- const code_function_callt &function_call =
376- instruction.get_function_call ();
377- if (function_call.lhs ().is_not_nil ())
378- dest.push_back (function_call.lhs ());
379- }
371+ if (instruction.call_lhs ().is_not_nil ())
372+ dest.push_back (instruction.call_lhs ());
380373 break ;
381374
382375 case ASSIGN:
@@ -999,35 +992,20 @@ void goto_programt::instructiont::transform(
999992
1000993 case FUNCTION_CALL:
1001994 {
1002- auto new_call = get_function_call ();
1003- bool change = false ;
1004-
1005- auto new_lhs = f (new_call.lhs ());
995+ auto new_lhs = f (call_lhs ());
1006996 if (new_lhs.has_value ())
1007- {
1008- new_call.lhs () = *new_lhs;
1009- change = true ;
1010- }
997+ call_lhs () = *new_lhs;
1011998
1012- auto new_function = f (new_call.function ());
1013- if (new_function.has_value ())
1014- {
1015- new_call.function () = *new_function;
1016- change = true ;
1017- }
999+ auto new_call_function = f (call_function ());
1000+ if (new_call_function.has_value ())
1001+ call_function () = *new_call_function;
10181002
1019- for (auto &a : new_call. arguments ())
1003+ for (auto &a : call_arguments ())
10201004 {
10211005 auto new_a = f (a);
10221006 if (new_a.has_value ())
1023- {
10241007 a = *new_a;
1025- change = true ;
1026- }
10271008 }
1028-
1029- if (change)
1030- set_function_call (new_call);
10311009 }
10321010 break ;
10331011
@@ -1082,13 +1060,10 @@ void goto_programt::instructiont::apply(
10821060 break ;
10831061
10841062 case FUNCTION_CALL:
1085- {
1086- const auto &call = get_function_call ();
1087- f (call.lhs ());
1088- for (auto &a : call.arguments ())
1063+ f (call_lhs ());
1064+ for (auto &a : call_arguments ())
10891065 f (a);
1090- }
1091- break ;
1066+ break ;
10921067
10931068 case GOTO:
10941069 case ASSUME:
0 commit comments