From 86581e496b07cd975b8df2e59734b1d5341f0fa3 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Sat, 10 Dec 2016 00:34:06 +0000 Subject: [PATCH] Rename find(SymbolVersion) to avoid overloading with find(StringRef). llvm-svn: 289293 --- lld/ELF/SymbolTable.cpp | 13 +++++++------ lld/ELF/SymbolTable.h | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 8927500..2d72735 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -569,7 +569,7 @@ void SymbolTable::initDemangledSyms() { } template -std::vector SymbolTable::find(SymbolVersion Ver) { +std::vector SymbolTable::findByVersion(SymbolVersion Ver) { if (Ver.IsExternCpp) { initDemangledSyms(); auto I = DemangledSyms->find(Ver.Name); @@ -583,7 +583,8 @@ std::vector SymbolTable::find(SymbolVersion Ver) { } template -std::vector SymbolTable::findAll(SymbolVersion Ver) { +std::vector +SymbolTable::findAllByVersion(SymbolVersion Ver) { std::vector Res; StringMatcher M({Ver.Name}); @@ -614,11 +615,11 @@ std::vector SymbolTable::findAll(SymbolVersion Ver) { template void SymbolTable::handleAnonymousVersion() { for (SymbolVersion &Ver : Config->VersionScriptGlobals) { if (Ver.HasWildcard) { - for (SymbolBody *B : findAll(Ver)) + for (SymbolBody *B : findAllByVersion(Ver)) B->symbol()->VersionId = VER_NDX_GLOBAL; continue; } - for (SymbolBody *B : find(Ver)) + for (SymbolBody *B : findByVersion(Ver)) if (B) B->symbol()->VersionId = VER_NDX_GLOBAL; } @@ -633,7 +634,7 @@ void SymbolTable::assignExactVersion(SymbolVersion Ver, uint16_t VersionId return; // Get a list of symbols which we need to assign the version to. - std::vector Syms = find(Ver); + std::vector Syms = findByVersion(Ver); // Assign the version. for (SymbolBody *B : Syms) { @@ -657,7 +658,7 @@ void SymbolTable::assignWildcardVersion(SymbolVersion Ver, uint16_t VersionId) { if (!Ver.HasWildcard) return; - std::vector Syms = findAll(Ver); + std::vector Syms = findAllByVersion(Ver); // Exact matching takes precendence over fuzzy matching, // so we set a version to a symbol only if no version has been assigned diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h index cd9bef3..0c4b42d 100644 --- a/lld/ELF/SymbolTable.h +++ b/lld/ELF/SymbolTable.h @@ -96,8 +96,8 @@ private: uint8_t Visibility, bool CanOmitFromDynSym, InputFile *File); - std::vector find(SymbolVersion Ver); - std::vector findAll(SymbolVersion Ver); + std::vector findByVersion(SymbolVersion Ver); + std::vector findAllByVersion(SymbolVersion Ver); void initDemangledSyms(); void handleAnonymousVersion(); -- 2.7.4