diff options
author | Tobias Grosser <tobias@grosser.es> | 2014-06-28 08:59:45 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2014-06-28 08:59:45 +0000 |
commit | 083d3d3cb3ef3bf698458105c3c7a6b2edfb1d2b (patch) | |
tree | df3f07cb711cacd377bbb52cf039b5b8ead2ac89 /polly/lib/Support/ScopHelper.cpp | |
parent | bc4ef90802fcc5314d430cab04c03b1eaddf5c8e (diff) | |
download | bcm5719-llvm-083d3d3cb3ef3bf698458105c3c7a6b2edfb1d2b.tar.gz bcm5719-llvm-083d3d3cb3ef3bf698458105c3c7a6b2edfb1d2b.zip |
[C++11] Use more range based fors
llvm-svn: 211981
Diffstat (limited to 'polly/lib/Support/ScopHelper.cpp')
-rw-r--r-- | polly/lib/Support/ScopHelper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp index 182db20ab1d..3e3a5355d25 100644 --- a/polly/lib/Support/ScopHelper.cpp +++ b/polly/lib/Support/ScopHelper.cpp @@ -94,9 +94,9 @@ void polly::simplifyRegion(Scop *S, Pass *P) { BasicBlock *OldEntry = R->getEntry(); BasicBlock *NewEntry = SplitBlock(OldEntry, OldEntry->begin(), P); - for (Scop::iterator SI = S->begin(), SE = S->end(); SI != SE; ++SI) - if ((*SI)->getBasicBlock() == OldEntry) { - (*SI)->setBasicBlock(NewEntry); + for (ScopStmt *Stmt : *S) + if (Stmt->getBasicBlock() == OldEntry) { + Stmt->setBasicBlock(NewEntry); break; } @@ -107,8 +107,8 @@ void polly::simplifyRegion(Scop *S, Pass *P) { if (!R->getExitingBlock()) { BasicBlock *NewExit = createSingleExitEdge(R, P); - for (Region::const_iterator RI = R->begin(), RE = R->end(); RI != RE; ++RI) - (*RI)->replaceExitRecursive(NewExit); + for (auto &&SubRegion : *R) + SubRegion->replaceExitRecursive(NewExit); } } |