diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 435c0054d0d..dd8d5fce8d4 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -1067,8 +1067,8 @@ struct LoopVectorize : public FunctionPass { // We only handle inner loops, so if there are children just recurse. if (!L->empty()) { bool Changed = false; - for (Loop::iterator I = L->begin(), E = L->begin(); I != E; ++I) - Changed |= processLoop(*I); + for (Loop *InnerL : *L) + Changed |= processLoop(InnerL); return Changed; }