[llvm] r220327 - Use a StringRef. No functionality change.
Rafael Espindola
rafael.espindola at gmail.com
Tue Oct 21 14:07:49 PDT 2014
Author: rafael
Date: Tue Oct 21 16:07:49 2014
New Revision: 220327
URL: http://llvm.org/viewvc/llvm-project?rev=220327&view=rev
Log:
Use a StringRef. No functionality change.
Modified:
llvm/trunk/tools/llvm-ar/llvm-ar.cpp
Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=220327&r1=220326&r2=220327&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Tue Oct 21 16:07:49 2014
@@ -652,11 +652,10 @@ computeNewArchiveMembers(ArchiveOperatio
Ret.insert(Ret.begin() + InsertPos, Members.size(), NewArchiveIterator());
int Pos = InsertPos;
- for (std::vector<std::string>::iterator I = Members.begin(),
- E = Members.end();
- I != E; ++I, ++Pos) {
- StringRef Name = sys::path::filename(*I);
- addMember(Ret, &*I, Name, Pos);
+ for (auto &Member : Members) {
+ StringRef Name = sys::path::filename(Member);
+ addMember(Ret, &Member, Name, Pos);
+ ++Pos;
}
return Ret;
More information about the llvm-commits
mailing list