mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
Add assert for valid slot indexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115649 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,6 +40,7 @@ struct CompEnd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LiveInterval::iterator LiveInterval::find(SlotIndex Pos) {
|
LiveInterval::iterator LiveInterval::find(SlotIndex Pos) {
|
||||||
|
assert(Pos.isValid() && "Cannot search for an invalid index");
|
||||||
return std::upper_bound(begin(), end(), LiveRange(SlotIndex(), Pos, 0),
|
return std::upper_bound(begin(), end(), LiveRange(SlotIndex(), Pos, 0),
|
||||||
CompEnd());
|
CompEnd());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user