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 | 1c9afa1aeb7de21a66bc4a16534ff2384f8c3b3a (patch) | |
tree | 5586a1051323e98ae66f2b2f4513404b036bd298 /llvm/lib/CodeGen/LiveInterval.cpp | |
parent | 9b3932c0bc1e4b625fab1a79b0f5094f68efaf59 (diff) | |
download | bcm5719-llvm-1c9afa1aeb7de21a66bc4a16534ff2384f8c3b3a.tar.gz bcm5719-llvm-1c9afa1aeb7de21a66bc4a16534ff2384f8c3b3a.zip |
Add assert for valid slot indexes.
llvm-svn: 115649
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index e18d7c7858b..0ea8f5978c9 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/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()); } |