Make a member function private and rename it to avoid function overloading.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@344196 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/ELF/SymbolTable.cpp b/ELF/SymbolTable.cpp
index 61247e3..cdcebab 100644
--- a/ELF/SymbolTable.cpp
+++ b/ELF/SymbolTable.cpp
@@ -178,7 +178,7 @@
}
// Find an existing symbol or create and insert a new one.
-std::pair<Symbol *, bool> SymbolTable::insert(StringRef Name) {
+std::pair<Symbol *, bool> SymbolTable::insertName(StringRef Name) {
// <name>@@<version> means the symbol is the default version. In that
// case <name>@@<version> will be used to resolve references to <name>.
//
@@ -222,7 +222,7 @@
InputFile *File) {
Symbol *S;
bool WasInserted;
- std::tie(S, WasInserted) = insert(Name);
+ std::tie(S, WasInserted) = insertName(Name);
// Merge in the new symbol's visibility.
S->Visibility = getMinVisibility(S->Visibility, Visibility);
@@ -557,7 +557,7 @@
const object::Archive::Symbol Sym) {
Symbol *S;
bool WasInserted;
- std::tie(S, WasInserted) = insert(Name);
+ std::tie(S, WasInserted) = insertName(Name);
if (WasInserted) {
replaceSymbol<LazyArchive>(S, File, STT_NOTYPE, Sym);
return;
@@ -581,7 +581,7 @@
void SymbolTable::addLazyObject(StringRef Name, LazyObjFile &File) {
Symbol *S;
bool WasInserted;
- std::tie(S, WasInserted) = insert(Name);
+ std::tie(S, WasInserted) = insertName(Name);
if (WasInserted) {
replaceSymbol<LazyObject>(S, File, STT_NOTYPE, Name);
return;
diff --git a/ELF/SymbolTable.h b/ELF/SymbolTable.h
index 668ea0e..3626bc1 100644
--- a/ELF/SymbolTable.h
+++ b/ELF/SymbolTable.h
@@ -71,7 +71,6 @@
uint8_t Binding, uint8_t StOther, uint8_t Type,
InputFile &File);
- std::pair<Symbol *, bool> insert(StringRef Name);
std::pair<Symbol *, bool> insert(StringRef Name, uint8_t Type,
uint8_t Visibility, bool CanOmitFromDynSym,
InputFile *File);
@@ -87,6 +86,8 @@
void handleDynamicList();
private:
+ std::pair<Symbol *, bool> insertName(StringRef Name);
+
std::vector<Symbol *> findByVersion(SymbolVersion Ver);
std::vector<Symbol *> findAllByVersion(SymbolVersion Ver);