summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-05 18:48:55 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-05 18:48:55 +0000
commit1c9afa1aeb7de21a66bc4a16534ff2384f8c3b3a (patch)
tree5586a1051323e98ae66f2b2f4513404b036bd298 /llvm/lib/CodeGen/LiveInterval.cpp
parent9b3932c0bc1e4b625fab1a79b0f5094f68efaf59 (diff)
downloadbcm5719-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.cpp1
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());
}
OpenPOWER on IntegriCloud