]> granicus.if.org Git - clang/commitdiff
Convert two loops to range-based loops. No behavior change.
authorNico Weber <nicolasweber@gmx.de>
Sat, 19 Sep 2015 21:36:51 +0000 (21:36 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 19 Sep 2015 21:36:51 +0000 (21:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248100 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index af740fc5b4c75b3a1fc96163c850005f63216b67..2f58c42a63be35ef7268cce03b9f758a111b37ca 100644 (file)
@@ -951,8 +951,8 @@ static bool ContainsCompileOrAssembleAction(const Action *A) {
       isa<AssembleJobAction>(A))
     return true;
 
-  for (Action::const_iterator it = A->begin(), ie = A->end(); it != ie; ++it)
-    if (ContainsCompileOrAssembleAction(*it))
+  for (const Action *Input : *A)
+    if (ContainsCompileOrAssembleAction(Input))
       return true;
 
   return false;
@@ -993,9 +993,7 @@ void Driver::BuildUniversalActions(const ToolChain &TC, DerivedArgList &Args,
 
   // Add in arch bindings for every top level action, as well as lipo and
   // dsymutil steps if needed.
-  for (unsigned i = 0, e = SingleActions.size(); i != e; ++i) {
-    Action *Act = SingleActions[i];
-
+  for (Action* Act : SingleActions) {
     // Make sure we can lipo this kind of output. If not (and it is an actual
     // output) then we disallow, since we can't create an output file with the
     // right name without overwriting it. We could remove this oddity by just