forked from OSchip/llvm-project
No really, don't use end().
Clearly, this function is never actually called with the last instruction in the function. llvm-svn: 176708
This commit is contained in:
parent
1f7ff93cda
commit
070015c6aa
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue