[BOLT] Fix a bug related to iterators in ReorderData pass
If `Itr` is the last element and then `std::next(Itr)` will be `Range.end()`, so that the statement `std::next(Itr)->second` is a UB. Reviewed By: yota9, maksfb Differential Revision: https://reviews.llvm.org/D159177
Loading
Please sign in to comment