@@ -1057,26 +1057,28 @@ static bool find_block_position_rec(
1057
1057
const irep_idt &identifier,
1058
1058
codet &root,
1059
1059
code_blockt* &dest,
1060
- exprt::operandst ::iterator &before)
1060
+ code_blockt::code_operandst ::iterator &before)
1061
1061
{
1062
1062
if (!root.has_operands ())
1063
1063
return false ;
1064
1064
1065
1065
code_blockt *our_dest=nullptr ;
1066
1066
1067
- exprt::operandst &operands=root.operands ();
1068
- exprt::operandst ::iterator first_found=operands.end ();
1067
+ auto &operands=root.statements ();
1068
+ code_blockt::code_operandst ::iterator first_found=operands.end ();
1069
1069
1070
- Forall_expr (it, operands)
1070
+ for (auto it=operands.begin ();
1071
+ it!=operands.end ();
1072
+ it++)
1071
1073
{
1072
1074
bool found=false ;
1073
1075
1074
1076
// be aware of the skip-carries-type hack
1075
1077
if (it->id ()==ID_code &&
1076
- to_code (*it). get_statement ()!=ID_skip)
1078
+ it-> get_statement ()!=ID_skip)
1077
1079
found=find_block_position_rec (
1078
1080
identifier,
1079
- to_code ( *it) ,
1081
+ *it,
1080
1082
our_dest,
1081
1083
before);
1082
1084
else
@@ -1154,14 +1156,14 @@ void dump_ct::insert_local_static_decls(
1154
1156
cleanup_decl (d, redundant, type_decls);
1155
1157
1156
1158
code_blockt *dest_ptr=nullptr ;
1157
- exprt::operandst::iterator before=b.operands ().end ();
1159
+ auto before=b.statements ().end ();
1158
1160
1159
1161
// some use of static variables might be optimised out if it is
1160
1162
// within an if(false) { ... } block
1161
1163
if (find_block_position_rec (*it, b, dest_ptr, before))
1162
1164
{
1163
1165
CHECK_RETURN (dest_ptr!=nullptr );
1164
- dest_ptr->operands ().insert (before, d);
1166
+ dest_ptr->statements ().insert (before, d);
1165
1167
}
1166
1168
}
1167
1169
}
@@ -1191,14 +1193,14 @@ void dump_ct::insert_local_type_decls(
1191
1193
skip.type ()=type;
1192
1194
1193
1195
code_blockt *dest_ptr=nullptr ;
1194
- exprt::operandst::iterator before=b.operands ().end ();
1196
+ auto before=b.statements ().end ();
1195
1197
1196
1198
// we might not find it in case a transparent union type cast
1197
1199
// has been removed by cleanup operations
1198
1200
if (find_block_position_rec (*it, b, dest_ptr, before))
1199
1201
{
1200
1202
CHECK_RETURN (dest_ptr!=nullptr );
1201
- dest_ptr->operands ().insert (before, skip);
1203
+ dest_ptr->statements ().insert (before, skip);
1202
1204
}
1203
1205
}
1204
1206
}
0 commit comments