r279154 - CodeGen: use range based for loop, NFC

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 18 14:40:06 PDT 2016


Author: compnerd
Date: Thu Aug 18 16:40:06 2016
New Revision: 279154

URL: http://llvm.org/viewvc/llvm-project?rev=279154&view=rev
Log:
CodeGen: use range based for loop, NFC

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=279154&r1=279153&r2=279154&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Aug 18 16:40:06 2016
@@ -2532,9 +2532,8 @@ static llvm::Value *tryEmitFusedAutorele
   }
 
   // Delete all the unnecessary instructions, from latest to earliest.
-  for (SmallVectorImpl<llvm::Instruction*>::iterator
-         i = insnsToKill.begin(), e = insnsToKill.end(); i != e; ++i)
-    (*i)->eraseFromParent();
+  for (auto *I : insnsToKill)
+    I->eraseFromParent();
 
   // Do the fused retain/autorelease if we were asked to.
   if (doRetainAutorelease)




More information about the cfe-commits mailing list