From 81232a9017945480189b8705899f730fdfb17dd5 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Sat, 13 Aug 2016 22:00:09 +0000 Subject: [PATCH] [IRCE] Use range-for; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278606 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp b/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp index f324281c6610..2f644406c0f0 100644 --- a/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp +++ b/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp @@ -925,13 +925,11 @@ void LoopConstrainer::cloneLoop(LoopConstrainer::ClonedLoop &Result, // to be edited to reflect that. No phi nodes need to be introduced because // the loop is in LCSSA. - for (auto SBBI = succ_begin(OriginalBB), SBBE = succ_end(OriginalBB); - SBBI != SBBE; ++SBBI) { - - if (OriginalLoop.contains(*SBBI)) + for (auto *SBB : successors(OriginalBB)) { + if (OriginalLoop.contains(SBB)) continue; // not an exit block - for (Instruction &I : **SBBI) { + for (Instruction &I : *SBB) { if (!isa(&I)) break;