summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2014-07-20 09:10:11 +0000
committerManuel Jacob <me@manueljacob.de>2014-07-20 09:10:11 +0000
commitd11beffef4f1117aceb9f2f5532b4a317c30c05a (patch)
treec0a3aa5e2d4225971366e16eac335aacf32f9eed /llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
parent4100ebd67b61abfb7fc7728e9af5dcc6e51327be (diff)
downloadbcm5719-llvm-d11beffef4f1117aceb9f2f5532b4a317c30c05a.tar.gz
bcm5719-llvm-d11beffef4f1117aceb9f2f5532b4a317c30c05a.zip
[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
Summary: This patch introduces two new iterator ranges and updates existing code to use it. No functional change intended. Test Plan: All tests (make check-all) still pass. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4481 llvm-svn: 213474
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp b/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
index ab1a9393c52..657038eeca7 100644
--- a/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
@@ -145,9 +145,7 @@ bool LoopInstSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
// bodies of subloops. We visit the headers of loops so that we can process
// their phis, but we contract the rest of the subloop body and only follow
// edges leading back to the original loop.
- for (succ_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE;
- ++SI) {
- BasicBlock *SuccBB = *SI;
+ for (BasicBlock *SuccBB : successors(BB)) {
if (!Visited.insert(SuccBB))
continue;
OpenPOWER on IntegriCloud