@@ -8,8 +8,6 @@ Author: Daniel Kroening, kroening@kroening.com
88
99#include " static_lifetime_init.h"
1010
11- #include < goto-programs/goto_instruction_code.h>
12-
1311#include < util/arith_tools.h>
1412#include < util/c_types.h>
1513#include < util/expr_initializer.h>
@@ -90,10 +88,7 @@ static_lifetime_init(const irep_idt &identifier, symbol_tablet &symbol_table)
9088 else
9189 rhs = symbol.value ;
9290
93- code_assignt code (symbol.symbol_expr (), rhs);
94- code.add_source_location () = symbol.location ;
95-
96- return std::move (code);
91+ return code_frontend_assignt{symbol.symbol_expr (), rhs, symbol.location };
9792}
9893
9994void static_lifetime_init (
@@ -156,9 +151,8 @@ void static_lifetime_init(
156151 code_type.return_type ().id () == ID_constructor &&
157152 code_type.parameters ().empty ())
158153 {
159- code_function_callt function_call (symbol.symbol_expr ());
160- function_call.add_source_location ()=source_location;
161- dest.add (function_call);
154+ dest.add (code_expressiont{side_effect_expr_function_callt{
155+ symbol.symbol_expr (), {}, code_type.return_type (), source_location}});
162156 }
163157 }
164158}
0 commit comments