diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-05 18:48:55 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-05 18:48:55 +0000 |
commit | 201ecfca9892b2eab2d04aa5da59f3f5e1efe49d (patch) | |
tree | b3f328095196e38dc4f00c62bcaa0bcf29e0cfb2 /lib/CodeGen/LiveInterval.cpp | |
parent | d86609fca46ac9e186557d2d7b12f029febecf0e (diff) |
Add assert for valid slot indexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115649 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 e18d7c7858..0ea8f5978c 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -40,6 +40,7 @@ struct CompEnd { } 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), CompEnd()); } |