[lld] r287192 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 18:16:07 PST 2016
Author: ruiu
Date: Wed Nov 16 20:16:06 2016
New Revision: 287192
URL: http://llvm.org/viewvc/llvm-project?rev=287192&view=rev
Log:
Simplify. NFC.
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=287192&r1=287191&r2=287192&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Wed Nov 16 20:16:06 2016
@@ -643,12 +643,9 @@ template <class ELFT> void SymbolTable<E
if (SymbolBody *B = find(Ver.Name))
B->symbol()->VersionId = VER_NDX_GLOBAL;
}
- if (Patterns.empty())
- return;
- StringMatcher M(Patterns);
- std::vector<SymbolBody *> Syms = findAll(M);
- for (SymbolBody *B : Syms)
- B->symbol()->VersionId = VER_NDX_GLOBAL;
+ if (!Patterns.empty())
+ for (SymbolBody *B : findAll(StringMatcher(Patterns)))
+ B->symbol()->VersionId = VER_NDX_GLOBAL;
}
// Set symbol versions to symbols. This function handles patterns
More information about the llvm-commits
mailing list