From f29b7bafb6323a023ba1fcae2b3bb0834d85835e Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 19 Jul 2016 17:50:27 +0000 Subject: [PATCH] [RegionPass] Some minor cleanups No functional change is intended. llvm-svn: 276000 --- llvm/lib/Analysis/RegionPass.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Analysis/RegionPass.cpp b/llvm/lib/Analysis/RegionPass.cpp index 5e1cdd4..7358aa6 100644 --- a/llvm/lib/Analysis/RegionPass.cpp +++ b/llvm/lib/Analysis/RegionPass.cpp @@ -10,7 +10,7 @@ // This file implements RegionPass and RGPassManager. All region optimization // and transformation passes are derived from RegionPass. RGPassManager is // responsible for managing RegionPasses. -// most of these codes are COPY from LoopPass.cpp +// Most of this code has been COPIED from LoopPass.cpp // //===----------------------------------------------------------------------===// #include "llvm/Analysis/RegionPass.h" @@ -64,9 +64,7 @@ bool RGPassManager::runOnFunction(Function &F) { return false; // Initialization - for (std::deque::const_iterator I = RQ.begin(), E = RQ.end(); - I != E; ++I) { - Region *R = *I; + for (Region *R : RQ) { for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { RegionPass *RP = (RegionPass *)getContainedPass(Index); Changed |= RP->doInitialization(R, *this); -- 2.7.4