Use a range loop.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 14 Jul 2015 23:51:01 +0000 (23:51 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 14 Jul 2015 23:51:01 +0000 (23:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242250 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/ArchiveWriter.cpp

index a40901c924eac405c28e72b36cacd4950b9ea16e..dd7af472565010f7f59e67428a92083966abe534 100644 (file)
@@ -154,10 +154,8 @@ static void writeStringTable(raw_fd_ostream &Out,
                              ArrayRef<NewArchiveIterator> Members,
                              std::vector<unsigned> &StringMapIndexes) {
   unsigned StartOffset = 0;
-  for (ArrayRef<NewArchiveIterator>::iterator I = Members.begin(),
-                                              E = Members.end();
-       I != E; ++I) {
-    StringRef Name = I->getName();
+  for (const NewArchiveIterator &I : Members) {
+    StringRef Name = I.getName();
     if (Name.size() < 16)
       continue;
     if (StartOffset == 0) {