mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Fix a conditional so we don't access past the end of the range. Thanks to
Andrew for bringing this to my attn. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23850 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -218,12 +218,10 @@ void LiveInterval::extendIntervalEndTo(Ranges::iterator I, unsigned NewEnd) {
|
|||||||
|
|
||||||
// If the newly formed range now touches the range after it and if they have
|
// If the newly formed range now touches the range after it and if they have
|
||||||
// the same value number, merge the two ranges into one range.
|
// the same value number, merge the two ranges into one range.
|
||||||
if (I != ranges.end()) {
|
Ranges::iterator Next = next(I);
|
||||||
Ranges::iterator Next = next(I);
|
if (Next != ranges.end() && Next->start == I->end && Next->ValId == ValId) {
|
||||||
if (Next->start == I->end && Next->ValId == ValId) {
|
I->end = Next->end;
|
||||||
I->end = Next->end;
|
ranges.erase(Next);
|
||||||
ranges.erase(Next);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user