From e7bcad327814a78ecb8d5f5545d2e3df84c67a5c Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 5 Jul 2015 14:23:59 +0000 Subject: Vendor import of clang trunk r241361: https://llvm.org/svn/llvm-project/cfe/trunk@241361 --- lib/CodeGen/CodeGenPGO.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/CodeGenPGO.cpp') diff --git a/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp index f182a46..8dffefc 100644 --- a/lib/CodeGen/CodeGenPGO.cpp +++ b/lib/CodeGen/CodeGenPGO.cpp @@ -275,10 +275,9 @@ struct ComputeRegionCounts : public ConstStmtVisitor { 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) { -- cgit v1.1