Simplify. NFC.

llvm-svn: 287192
This commit is contained in:
Rui Ueyama 2016-11-17 02:16:06 +00:00
parent 94bcfae26d
commit 4162baa4bb
1 changed files with 3 additions and 6 deletions

View File

@ -643,12 +643,9 @@ template <class ELFT> void SymbolTable<ELFT>::handleAnonymousVersion() {
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