From: David Blaikie Date: Mon, 13 Mar 2017 21:46:14 +0000 (+0000) Subject: Remove unused lambda capture X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f54996a23988d165350e337a97018ecc3c84af7;p=llvm Remove unused lambda capture git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297675 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 6cb647d48eb..a024b6926d5 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -318,7 +318,7 @@ static bool linkFiles(const char *argv0, LLVMContext &Context, Linker &L, if (InternalizeLinkedSymbols) { Err = L.linkInModule( std::move(M), ApplicableFlags, [](Module &M, const StringSet<> &GVS) { - internalizeModule(M, [&M, &GVS](const GlobalValue &GV) { + internalizeModule(M, [&GVS](const GlobalValue &GV) { return !GV.hasName() || (GVS.count(GV.getName()) == 0); }); });