Skip to content

Commit d449057

Browse files
author
Daniel Kroening
committed
avoid access to instructiont::code
1 parent ac4706d commit d449057

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/analyses/constant_propagator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ void constant_propagator_domaint::transform(
156156

157157
if(from->is_decl())
158158
{
159-
const code_declt &code_decl=to_code_decl(from->code);
159+
const auto &code_decl=from->get_decl();
160160
const symbol_exprt &symbol = code_decl.symbol();
161161
values.set_to_top(symbol);
162162
}
163163
else if(from->is_assign())
164164
{
165-
const code_assignt &assignment=to_code_assign(from->code);
165+
const auto &assignment=from->get_assign();
166166
const exprt &lhs=assignment.lhs();
167167
const exprt &rhs=assignment.rhs();
168168
assign_rec(values, lhs, rhs, ns, cp, true);
@@ -189,12 +189,12 @@ void constant_propagator_domaint::transform(
189189
}
190190
else if(from->is_dead())
191191
{
192-
const code_deadt &code_dead=to_code_dead(from->code);
192+
const auto &code_dead=from->get_dead();
193193
values.set_to_top(code_dead.symbol());
194194
}
195195
else if(from->is_function_call())
196196
{
197-
const code_function_callt &function_call=to_code_function_call(from->code);
197+
const auto &function_call=from->get_function_call();
198198
const exprt &function=function_call.function();
199199

200200
if(function.id()==ID_symbol)

0 commit comments

Comments
 (0)