File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -513,18 +513,18 @@ static void populate_live_range_holes(
513
513
merge_vars.begin (), merge_vars.end ());
514
514
std::sort (sorted_by_startpc.begin (), sorted_by_startpc.end (), lt_startpc);
515
515
516
+ PRECONDITION (!sorted_by_startpc.empty ());
516
517
maybe_add_hole (
517
518
merge_into,
518
519
expanded_live_range_start,
519
520
sorted_by_startpc[0 ]->var .start_pc );
520
- for (java_bytecode_convert_methodt::method_offsett idx = 0 ;
521
- idx < sorted_by_startpc.size () - 1 ;
522
- ++idx )
521
+ for (auto it = std::next (sorted_by_startpc. begin ()) ;
522
+ it != sorted_by_startpc.end () ;
523
+ ++it )
523
524
{
525
+ auto &local_var = (*std::prev (it))->var ;
524
526
maybe_add_hole (
525
- merge_into,
526
- sorted_by_startpc[idx]->var .start_pc +sorted_by_startpc[idx]->var .length ,
527
- sorted_by_startpc[idx+1 ]->var .start_pc );
527
+ merge_into, local_var.start_pc + local_var.length , (*it)->var .start_pc );
528
528
}
529
529
}
530
530
You can’t perform that action at this time.
0 commit comments