diff options
Diffstat (limited to 'lib/Analysis/LiveVariables.cpp')
-rw-r--r-- | lib/Analysis/LiveVariables.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp index 0ab158036d84..5e0a9a0d73c8 100644 --- a/lib/Analysis/LiveVariables.cpp +++ b/lib/Analysis/LiveVariables.cpp @@ -322,11 +322,10 @@ void TransferFunctions::Visit(Stmt *S) { return; } } - - for (Stmt::child_iterator it = S->child_begin(), ei = S->child_end(); - it != ei; ++it) { - if (Stmt *child = *it) - AddLiveStmt(val.liveStmts, LV.SSetFact, child); + + for (Stmt *Child : S->children()) { + if (Child) + AddLiveStmt(val.liveStmts, LV.SSetFact, Child); } } |