@@ -107,8 +107,8 @@ void goto_program2codet::scan_for_varargs()
107107 {
108108 if (instruction.is_assign ())
109109 {
110- const exprt &l = instruction.get_assign (). lhs ();
111- const exprt &r = instruction.get_assign (). rhs ();
110+ const exprt &l = instruction.assign_lhs ();
111+ const exprt &r = instruction.assign_rhs ();
112112
113113 // find va_start
114114 if (
@@ -286,7 +286,7 @@ goto_programt::const_targett goto_program2codet::convert_assign(
286286 goto_programt::const_targett upper_bound,
287287 code_blockt &dest)
288288{
289- const code_assignt &a = target->get_assign () ;
289+ const code_assignt a{target-> assign_lhs (), target->assign_rhs ()} ;
290290
291291 if (va_list_expr.find (a.lhs ())!=va_list_expr.end ())
292292 return convert_assign_varargs (target, upper_bound, dest);
@@ -301,10 +301,8 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
301301 goto_programt::const_targett upper_bound,
302302 code_blockt &dest)
303303{
304- const code_assignt &assign = target->get_assign ();
305-
306- const exprt this_va_list_expr=assign.lhs ();
307- const exprt &r=skip_typecast (assign.rhs ());
304+ const exprt this_va_list_expr = target->assign_lhs ();
305+ const exprt &r = skip_typecast (target->assign_rhs ());
308306
309307 if (r.id ()==ID_constant &&
310308 (r.is_zero () || to_constant_expr (r).get_value ()==ID_NULL))
@@ -347,12 +345,12 @@ goto_programt::const_targett goto_program2codet::convert_assign_varargs(
347345 if (next!=upper_bound &&
348346 next->is_assign ())
349347 {
350- const exprt &n_r = next->get_assign (). rhs ();
348+ const exprt &n_r = next->assign_rhs ();
351349 if (
352350 n_r.id () == ID_dereference &&
353351 skip_typecast (to_dereference_expr (n_r).pointer ()) == this_va_list_expr)
354352 {
355- f.lhs () = next->get_assign (). lhs ();
353+ f.lhs () = next->assign_lhs ();
356354
357355 type_of.arguments ().push_back (f.lhs ());
358356 f.arguments ().push_back (type_of);
@@ -467,14 +465,14 @@ goto_programt::const_targett goto_program2codet::convert_decl(
467465 !next->is_target () &&
468466 (next->is_assign () || next->is_function_call ()))
469467 {
470- exprt lhs = next-> is_assign () ? next-> get_assign (). lhs ()
471- : next->get_function_call ().lhs ();
468+ exprt lhs =
469+ next-> is_assign () ? next-> assign_lhs () : next->get_function_call ().lhs ();
472470 if (lhs==symbol &&
473471 va_list_expr.find (lhs)==va_list_expr.end ())
474472 {
475473 if (next->is_assign ())
476474 {
477- d.set_initial_value ({next->get_assign (). rhs ()});
475+ d.set_initial_value ({next->assign_rhs ()});
478476 }
479477 else
480478 {
0 commit comments