CodeGen: use range based for loop, NFC

llvm-svn: 279154
This commit is contained in:
Saleem Abdulrasool 2016-08-18 21:40:06 +00:00
parent a7c87a9430
commit be25c486dc
1 changed files with 2 additions and 3 deletions

View File

@ -2532,9 +2532,8 @@ static llvm::Value *tryEmitFusedAutoreleaseOfResult(CodeGenFunction &CGF,
}
// 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)