diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-13 19:56:28 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-13 19:56:28 +0000 |
| commit | 2e1ab807069be1b7c68ae30a5c75bcb859923950 (patch) | |
| tree | eb2c9253dafe33b7ab2651ccce6a88afc15d9803 /lib/CodeGen/LiveInterval.cpp | |
| parent | c9e14412a9989daf51a4f8765d1ad3fb8ef85392 (diff) | |
| download | external_llvm-2e1ab807069be1b7c68ae30a5c75bcb859923950.zip external_llvm-2e1ab807069be1b7c68ae30a5c75bcb859923950.tar.gz external_llvm-2e1ab807069be1b7c68ae30a5c75bcb859923950.tar.bz2 | |
Add an assertion to make PR7542 fail consistently.
LiveInterval::overlapsFrom dereferences end() if it is called on an empty
interval.
It would be reasonable to just return false - an empty interval doesn't overlap
anything, but I want to know who is doing it first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
| -rw-r--r-- | lib/CodeGen/LiveInterval.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 9b057b0..1b8509b 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -119,6 +119,7 @@ bool LiveInterval::killedInRange(SlotIndex Start, SlotIndex End) const { // bool LiveInterval::overlapsFrom(const LiveInterval& other, const_iterator StartPos) const { + assert(!empty() && "empty interval"); const_iterator i = begin(); const_iterator ie = end(); const_iterator j = StartPos; |
