[lld] r335447 - [ELF] - Replace llvm::find_if with the loop. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 25 02:30:39 PDT 2018
Author: grimar
Date: Mon Jun 25 02:30:39 2018
New Revision: 335447
URL: http://llvm.org/viewvc/llvm-project?rev=335447&view=rev
Log:
[ELF] - Replace llvm::find_if with the loop. NFC.
Requested during post commit review.
Modified:
lld/trunk/ELF/SymbolTable.cpp
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=335447&r1=335446&r2=335447&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Mon Jun 25 02:30:39 2018
@@ -160,10 +160,9 @@ template <class ELFT> void SymbolTable::
return;
// Do not wrap the same symbol twice.
- if (llvm::find_if(WrappedSymbols, [&](const WrappedSymbol &S) {
- return S.Sym == Sym;
- }) != WrappedSymbols.end())
- return;
+ for (const WrappedSymbol &S : WrappedSymbols)
+ if (S.Sym == Sym)
+ return;
Symbol *Real = addUndefined<ELFT>(Saver.save("__real_" + Name));
Symbol *Wrap = addUndefined<ELFT>(Saver.save("__wrap_" + Name));
More information about the llvm-commits
mailing list