@@ -233,29 +233,28 @@ static assignmentt rewrite_with_to_field_symbols(
233
233
assignmentt assignment,
234
234
const namespacet &ns)
235
235
{
236
- ssa_exprt &lhs_mod = assignment.lhs ;
237
236
if (use_update)
238
237
{
239
238
while (assignment.rhs .id () == ID_update &&
240
239
to_update_expr (assignment.rhs ).designator ().size () == 1 &&
241
- (lhs_mod .type ().id () == ID_array ||
242
- lhs_mod .type ().id () == ID_struct ||
243
- lhs_mod .type ().id () == ID_struct_tag))
240
+ (assignment. lhs .type ().id () == ID_array ||
241
+ assignment. lhs .type ().id () == ID_struct ||
242
+ assignment. lhs .type ().id () == ID_struct_tag))
244
243
{
245
244
exprt field_sensitive_lhs;
246
245
const update_exprt &update = to_update_expr (assignment.rhs );
247
246
PRECONDITION (update.designator ().size () == 1 );
248
247
const exprt &designator = update.designator ().front ();
249
248
250
- if (lhs_mod .type ().id () == ID_array)
249
+ if (assignment. lhs .type ().id () == ID_array)
251
250
{
252
251
field_sensitive_lhs =
253
- index_exprt (lhs_mod , to_index_designator (designator).index ());
252
+ index_exprt (assignment. lhs , to_index_designator (designator).index ());
254
253
}
255
254
else
256
255
{
257
256
field_sensitive_lhs = member_exprt (
258
- lhs_mod ,
257
+ assignment. lhs ,
259
258
to_member_designator (designator).get_component_name (),
260
259
update.new_value ().type ());
261
260
}
@@ -266,28 +265,28 @@ static assignmentt rewrite_with_to_field_symbols(
266
265
break ;
267
266
268
267
assignment.rhs = update.new_value ();
269
- lhs_mod = to_ssa_expr (field_sensitive_lhs);
268
+ assignment. lhs = to_ssa_expr (field_sensitive_lhs);
270
269
}
271
270
}
272
271
else
273
272
{
274
273
while (assignment.rhs .id () == ID_with &&
275
274
to_with_expr (assignment.rhs ).operands ().size () == 3 &&
276
- (lhs_mod .type ().id () == ID_array ||
277
- lhs_mod .type ().id () == ID_struct ||
278
- lhs_mod .type ().id () == ID_struct_tag))
275
+ (assignment. lhs .type ().id () == ID_array ||
276
+ assignment. lhs .type ().id () == ID_struct ||
277
+ assignment. lhs .type ().id () == ID_struct_tag))
279
278
{
280
279
exprt field_sensitive_lhs;
281
280
const with_exprt &with_expr = to_with_expr (assignment.rhs );
282
281
283
- if (lhs_mod .type ().id () == ID_array)
282
+ if (assignment. lhs .type ().id () == ID_array)
284
283
{
285
- field_sensitive_lhs = index_exprt (lhs_mod , with_expr.where ());
284
+ field_sensitive_lhs = index_exprt (assignment. lhs , with_expr.where ());
286
285
}
287
286
else
288
287
{
289
288
field_sensitive_lhs = member_exprt (
290
- lhs_mod ,
289
+ assignment. lhs ,
291
290
with_expr.where ().get (ID_component_name),
292
291
with_expr.new_value ().type ());
293
292
}
@@ -299,7 +298,7 @@ static assignmentt rewrite_with_to_field_symbols(
299
298
break ;
300
299
301
300
assignment.rhs = with_expr.new_value ();
302
- lhs_mod = to_ssa_expr (field_sensitive_lhs);
301
+ assignment. lhs = to_ssa_expr (field_sensitive_lhs);
303
302
}
304
303
}
305
304
return assignment;
0 commit comments