diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 23:16:38 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 23:16:38 +0000 |
commit | 8d121404370cd57be7e72543127a1afe2faa1b10 (patch) | |
tree | f1031385bc2a5e61ab4ed51df2ad8c2d5bb3283d /include/llvm/CodeGen | |
parent | af24964251e27c2dd863239ba66ffd967b593be5 (diff) |
Avoid dereferencing end() in collectInterferingVRegs() when there is no
interference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index c21df28cdd..72f1624d06 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -250,6 +250,7 @@ namespace llvm { /// position is in a hole, this method returns an iterator pointing to the /// LiveRange immediately after the hole. iterator advanceTo(iterator I, SlotIndex Pos) { + assert(I != end()); if (Pos >= endIndex()) return end(); while (I->end <= Pos) ++I; |