|
8 | 8 |
|
9 | 9 | #include "static_lifetime_init.h"
|
10 | 10 |
|
11 |
| -#include <goto-programs/goto_instruction_code.h> |
12 |
| - |
13 | 11 | #include <util/arith_tools.h>
|
14 | 12 | #include <util/c_types.h>
|
15 | 13 | #include <util/expr_initializer.h>
|
@@ -90,10 +88,7 @@ static_lifetime_init(const irep_idt &identifier, symbol_tablet &symbol_table)
|
90 | 88 | else
|
91 | 89 | rhs = symbol.value;
|
92 | 90 |
|
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}; |
97 | 92 | }
|
98 | 93 |
|
99 | 94 | void static_lifetime_init(
|
@@ -156,9 +151,8 @@ void static_lifetime_init(
|
156 | 151 | code_type.return_type().id() == ID_constructor &&
|
157 | 152 | code_type.parameters().empty())
|
158 | 153 | {
|
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}}); |
162 | 156 | }
|
163 | 157 | }
|
164 | 158 | }
|
0 commit comments