summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2015-07-02 21:03:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2015-07-02 21:03:14 +0000
commit642f173ae90097f0da877423172fe45a320e1e5f (patch)
tree284e9818d8cc8d4cf9782398cd4b3573104ff746 /clang/lib/CodeGen/CodeGenPGO.cpp
parent9c218592c8400f1ad2345b39e64904fda067553d (diff)
downloadbcm5719-llvm-642f173ae90097f0da877423172fe45a320e1e5f.tar.gz
bcm5719-llvm-642f173ae90097f0da877423172fe45a320e1e5f.zip
Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops.
The pattern was born out of the lack of range-based for loops in C++98 and is somewhat obscure. No functionality change intended. llvm-svn: 241300
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index f182a469b3a..8dffefc871f 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -275,10 +275,9 @@ struct ComputeRegionCounts : public ConstStmtVisitor<ComputeRegionCounts> {
void VisitStmt(const Stmt *S) {
RecordStmtCount(S);
- for (Stmt::const_child_range I = S->children(); I; ++I) {
- if (*I)
- this->Visit(*I);
- }
+ for (const Stmt *Child : S->children())
+ if (Child)
+ this->Visit(Child);
}
void VisitFunctionDecl(const FunctionDecl *D) {
OpenPOWER on IntegriCloud