@@ -108,8 +108,8 @@ void goto_program2codet::scan_for_varargs()
108108 {
109109 if (instruction.is_assign ())
110110 {
111- const exprt &l = instruction.get_assign (). lhs ();
112- const exprt &r = instruction.get_assign (). rhs ();
111+ const exprt &l = instruction.assign_lhs ();
112+ const exprt &r = instruction.assign_rhs ();
113113
114114 // find va_start
115115 if (
@@ -287,7 +287,7 @@ goto_programt::const_targett goto_program2codet::convert_assign(
287287 goto_programt::const_targett upper_bound,
288288 code_blockt &dest)
289289{
290- const code_assignt &a = target->get_assign () ;
290+ const code_assignt a{target-> assign_lhs (), target->assign_rhs ()} ;
291291
292292 if (va_list_expr.find (a.lhs ())!=va_list_expr.end ())
293293 return convert_assign_varargs (target, upper_bound, dest);
@@ -302,10 +302,8 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
302302 goto_programt::const_targett upper_bound,
303303 code_blockt &dest)
304304{
305- const code_assignt &assign = target->get_assign ();
306-
307- const exprt this_va_list_expr=assign.lhs ();
308- const exprt &r=skip_typecast (assign.rhs ());
305+ const exprt this_va_list_expr = target->assign_lhs ();
306+ const exprt &r = skip_typecast (target->assign_rhs ());
309307
310308 if (r.id ()==ID_constant &&
311309 (r.is_zero () || to_constant_expr (r).get_value ()==ID_NULL))
@@ -348,12 +346,12 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
348346 if (next!=upper_bound &&
349347 next->is_assign ())
350348 {
351- const exprt &n_r = next->get_assign (). rhs ();
349+ const exprt &n_r = next->assign_rhs ();
352350 if (
353351 n_r.id () == ID_dereference &&
354352 skip_typecast (to_dereference_expr (n_r).pointer ()) == this_va_list_expr)
355353 {
356- f.lhs () = next->get_assign (). lhs ();
354+ f.lhs () = next->assign_lhs ();
357355
358356 type_of.arguments ().push_back (f.lhs ());
359357 f.arguments ().push_back (type_of);
@@ -468,14 +466,14 @@ goto_programt::const_targett goto_program2codet::convert_decl(
468466 !next->is_target () &&
469467 (next->is_assign () || next->is_function_call ()))
470468 {
471- exprt lhs = next-> is_assign () ? next-> get_assign (). lhs ()
472- : next->get_function_call ().lhs ();
469+ exprt lhs =
470+ next-> is_assign () ? next-> assign_lhs () : next->get_function_call ().lhs ();
473471 if (lhs==symbol &&
474472 va_list_expr.find (lhs)==va_list_expr.end ())
475473 {
476474 if (next->is_assign ())
477475 {
478- d.set_initial_value ({next->get_assign (). rhs ()});
476+ d.set_initial_value ({next->assign_rhs ()});
479477 }
480478 else
481479 {
0 commit comments