[llvm] r220327 - Use a StringRef. No functionality change.
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Oct 21 14:48:56 PDT 2014
Sorry, wrong commit message. It should have been: Use a range loop.
StringRef is next :-)
On 21 October 2014 17:07, Rafael Espindola <rafael.espindola at gmail.com> wrote:
> 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list