[lld] r310752 - Remove unused lambda capture.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 13:21:21 PDT 2017


Generally for non-escaped lambdas I'd encourage the use of [&] - no need to
maintain a list of specific captures & other nested scopes (if, while, etc)
'capture' all locals implicitly anyway, so this shouldn't be much/any
different.

On Fri, Aug 11, 2017 at 1:38 PM Zachary Turner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: zturner
> Date: Fri Aug 11 13:37:49 2017
> New Revision: 310752
>
> URL: http://llvm.org/viewvc/llvm-project?rev=310752&view=rev
> Log:
> Remove unused lambda capture.
>
> Modified:
>     lld/trunk/COFF/PDB.cpp
>
> Modified: lld/trunk/COFF/PDB.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=310752&r1=310751&r2=310752&view=diff
>
> ==============================================================================
> --- lld/trunk/COFF/PDB.cpp (original)
> +++ lld/trunk/COFF/PDB.cpp Fri Aug 11 13:37:49 2017
> @@ -709,7 +709,7 @@ void PDBLinker::addObjectsToPDB() {
>    // Compute the public and global symbols.
>    auto &GsiBuilder = Builder.getGsiBuilder();
>    std::vector<PublicSym32> Publics;
> -  Symtab->forEachSymbol([&Publics, &GsiBuilder](Symbol *S) {
> +  Symtab->forEachSymbol([&Publics](Symbol *S) {
>      // Only emit defined, live symbols that have a chunk.
>      auto *Def = dyn_cast<Defined>(S->body());
>      if (Def && Def->isLive() && Def->getChunk())
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/f1bbf759/attachment.html>


More information about the llvm-commits mailing list