aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/SlotIndexes.h4
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();