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(
513513 merge_vars.begin (), merge_vars.end ());
514514 std::sort (sorted_by_startpc.begin (), sorted_by_startpc.end (), lt_startpc);
515515
516+ PRECONDITION (!sorted_by_startpc.empty ());
516517 maybe_add_hole (
517518 merge_into,
518519 expanded_live_range_start,
519520 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 )
523524 {
525+ auto &local_var = (*std::prev (it))->var ;
524526 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 );
528528 }
529529}
530530
You can’t perform that action at this time.
0 commit comments