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
This commit is contained in:
Jakob Stoklund Olesen 2013-03-08 18:36:36 +00:00
parent 423de3f047
commit 768ed8b8c3

View File

@ -401,8 +401,8 @@ namespace llvm {
SlotIndex getNextNonNullIndex(SlotIndex Index) { SlotIndex getNextNonNullIndex(SlotIndex Index) {
IndexList::iterator I = Index.listEntry(); IndexList::iterator I = Index.listEntry();
IndexList::iterator E = indexList.end(); IndexList::iterator E = indexList.end();
while (I != E) while (++I != E)
if ((++I)->getInstr()) if (I->getInstr())
return SlotIndex(I, Index.getSlot()); return SlotIndex(I, Index.getSlot());
// We reached the end of the function. // We reached the end of the function.
return getLastIndex(); return getLastIndex();