@@ -166,29 +166,28 @@ static assignmentt rewrite_with_to_field_symbols(
166
166
assignmentt assignment,
167
167
const namespacet &ns)
168
168
{
169
- ssa_exprt &lhs_mod = assignment.lhs ;
170
169
if (use_update)
171
170
{
172
171
while (assignment.rhs .id () == ID_update &&
173
172
to_update_expr (assignment.rhs ).designator ().size () == 1 &&
174
- (lhs_mod .type ().id () == ID_array ||
175
- lhs_mod .type ().id () == ID_struct ||
176
- lhs_mod .type ().id () == ID_struct_tag))
173
+ (assignment. lhs .type ().id () == ID_array ||
174
+ assignment. lhs .type ().id () == ID_struct ||
175
+ assignment. lhs .type ().id () == ID_struct_tag))
177
176
{
178
177
exprt field_sensitive_lhs;
179
178
const update_exprt &update = to_update_expr (assignment.rhs );
180
179
PRECONDITION (update.designator ().size () == 1 );
181
180
const exprt &designator = update.designator ().front ();
182
181
183
- if (lhs_mod .type ().id () == ID_array)
182
+ if (assignment. lhs .type ().id () == ID_array)
184
183
{
185
184
field_sensitive_lhs =
186
- index_exprt (lhs_mod , to_index_designator (designator).index ());
185
+ index_exprt (assignment. lhs , to_index_designator (designator).index ());
187
186
}
188
187
else
189
188
{
190
189
field_sensitive_lhs = member_exprt (
191
- lhs_mod ,
190
+ assignment. lhs ,
192
191
to_member_designator (designator).get_component_name (),
193
192
update.new_value ().type ());
194
193
}
@@ -199,28 +198,28 @@ static assignmentt rewrite_with_to_field_symbols(
199
198
break ;
200
199
201
200
assignment.rhs = update.new_value ();
202
- lhs_mod = to_ssa_expr (field_sensitive_lhs);
201
+ assignment. lhs = to_ssa_expr (field_sensitive_lhs);
203
202
}
204
203
}
205
204
else
206
205
{
207
206
while (assignment.rhs .id () == ID_with &&
208
207
to_with_expr (assignment.rhs ).operands ().size () == 3 &&
209
- (lhs_mod .type ().id () == ID_array ||
210
- lhs_mod .type ().id () == ID_struct ||
211
- lhs_mod .type ().id () == ID_struct_tag))
208
+ (assignment. lhs .type ().id () == ID_array ||
209
+ assignment. lhs .type ().id () == ID_struct ||
210
+ assignment. lhs .type ().id () == ID_struct_tag))
212
211
{
213
212
exprt field_sensitive_lhs;
214
213
const with_exprt &with_expr = to_with_expr (assignment.rhs );
215
214
216
- if (lhs_mod .type ().id () == ID_array)
215
+ if (assignment. lhs .type ().id () == ID_array)
217
216
{
218
- field_sensitive_lhs = index_exprt (lhs_mod , with_expr.where ());
217
+ field_sensitive_lhs = index_exprt (assignment. lhs , with_expr.where ());
219
218
}
220
219
else
221
220
{
222
221
field_sensitive_lhs = member_exprt (
223
- lhs_mod ,
222
+ assignment. lhs ,
224
223
with_expr.where ().get (ID_component_name),
225
224
with_expr.new_value ().type ());
226
225
}
@@ -232,7 +231,7 @@ static assignmentt rewrite_with_to_field_symbols(
232
231
break ;
233
232
234
233
assignment.rhs = with_expr.new_value ();
235
- lhs_mod = to_ssa_expr (field_sensitive_lhs);
234
+ assignment. lhs = to_ssa_expr (field_sensitive_lhs);
236
235
}
237
236
}
238
237
return assignment;
0 commit comments