[lld] r289293 - Rename find(SymbolVersion) to avoid overloading with find(StringRef).
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 16:34:07 PST 2016
Author: ruiu
Date: Fri Dec 9 18:34:06 2016
New Revision: 289293
URL: http://llvm.org/viewvc/llvm-project?rev=289293&view=rev
Log:
Rename find(SymbolVersion) to avoid overloading with find(StringRef).
Modified:
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=289293&r1=289292&r2=289293&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Fri Dec 9 18:34:06 2016
@@ -569,7 +569,7 @@ void SymbolTable<ELFT>::initDemangledSym
}
template <class ELFT>
-std::vector<SymbolBody *> SymbolTable<ELFT>::find(SymbolVersion Ver) {
+std::vector<SymbolBody *> SymbolTable<ELFT>::findByVersion(SymbolVersion Ver) {
if (Ver.IsExternCpp) {
initDemangledSyms();
auto I = DemangledSyms->find(Ver.Name);
@@ -583,7 +583,8 @@ std::vector<SymbolBody *> SymbolTable<EL
}
template <class ELFT>
-std::vector<SymbolBody *> SymbolTable<ELFT>::findAll(SymbolVersion Ver) {
+std::vector<SymbolBody *>
+SymbolTable<ELFT>::findAllByVersion(SymbolVersion Ver) {
std::vector<SymbolBody *> Res;
StringMatcher M({Ver.Name});
@@ -614,11 +615,11 @@ std::vector<SymbolBody *> SymbolTable<EL
template <class ELFT> void SymbolTable<ELFT>::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<ELFT>::assignExactVersi
return;
// Get a list of symbols which we need to assign the version to.
- std::vector<SymbolBody *> Syms = find(Ver);
+ std::vector<SymbolBody *> Syms = findByVersion(Ver);
// Assign the version.
for (SymbolBody *B : Syms) {
@@ -657,7 +658,7 @@ void SymbolTable<ELFT>::assignWildcardVe
uint16_t VersionId) {
if (!Ver.HasWildcard)
return;
- std::vector<SymbolBody *> Syms = findAll(Ver);
+ std::vector<SymbolBody *> 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
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=289293&r1=289292&r2=289293&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Fri Dec 9 18:34:06 2016
@@ -96,8 +96,8 @@ private:
uint8_t Visibility, bool CanOmitFromDynSym,
InputFile *File);
- std::vector<SymbolBody *> find(SymbolVersion Ver);
- std::vector<SymbolBody *> findAll(SymbolVersion Ver);
+ std::vector<SymbolBody *> findByVersion(SymbolVersion Ver);
+ std::vector<SymbolBody *> findAllByVersion(SymbolVersion Ver);
void initDemangledSyms();
void handleAnonymousVersion();
More information about the llvm-commits
mailing list