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