diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-03-08 18:36:36 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-03-08 18:36:36 +0000 |
commit | 768ed8b8c3281d6519d3f4740f6c7aa469bd1ac8 (patch) | |
tree | 42bad0dd0552b88e18c26cbe475f892e63f04d4a | |
parent | 423de3f0478fd8e4f8aa650d8cf9f64d08963118 (diff) |
No really, don't use end().
Clearly, this function is never actually called with the last
instruction in the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176708 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/SlotIndexes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h index 0f85c994a2..a277080466 100644 --- a/include/llvm/CodeGen/SlotIndexes.h +++ b/include/llvm/CodeGen/SlotIndexes.h @@ -401,8 +401,8 @@ namespace llvm { SlotIndex getNextNonNullIndex(SlotIndex Index) { IndexList::iterator I = Index.listEntry(); IndexList::iterator E = indexList.end(); - while (I != E) - if ((++I)->getInstr()) + while (++I != E) + if (I->getInstr()) return SlotIndex(I, Index.getSlot()); // We reached the end of the function. return getLastIndex(); |