[llvm] r266903 - Replace a loop with a for-each loop. No behavior change.

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 12:09:26 PDT 2016


Author: nico
Date: Wed Apr 20 14:09:26 2016
New Revision: 266903

URL: http://llvm.org/viewvc/llvm-project?rev=266903&view=rev
Log:
Replace a loop with a for-each loop. No behavior change.

Modified:
    llvm/trunk/lib/Object/ArchiveWriter.cpp

Modified: llvm/trunk/lib/Object/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ArchiveWriter.cpp?rev=266903&r1=266902&r2=266903&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Object/ArchiveWriter.cpp Wed Apr 20 14:09:26 2016
@@ -327,8 +327,7 @@ llvm::writeArchive(StringRef ArcName,
   std::vector<MemoryBufferRef> Members;
   std::vector<sys::fs::file_status> NewMemberStatus;
 
-  for (unsigned I = 0, N = NewMembers.size(); I < N; ++I) {
-    NewArchiveIterator &Member = NewMembers[I];
+  for (NewArchiveIterator &Member : NewMembers) {
     MemoryBufferRef MemberRef;
 
     if (Member.isNewMember()) {




More information about the llvm-commits mailing list