diff options
| author | Rui Ueyama <ruiu@google.com> | 2018-10-10 22:49:29 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2018-10-10 22:49:29 +0000 |
| commit | 3c4344810a54989a0c5b7546fce9580800a12e50 (patch) | |
| tree | 1ee0ddac7dae9215283a490cfcf0dc2dcd2325d9 | |
| parent | 11ca54f49ce708e2b892e51e6b53f4d9e78176f3 (diff) | |
| download | bcm5719-llvm-3c4344810a54989a0c5b7546fce9580800a12e50.tar.gz bcm5719-llvm-3c4344810a54989a0c5b7546fce9580800a12e50.zip | |
Make a member function private and rename it to avoid function overloading.
llvm-svn: 344196
| -rw-r--r-- | lld/ELF/SymbolTable.cpp | 8 | ||||
| -rw-r--r-- | lld/ELF/SymbolTable.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 61247e35508..cdcebab09b3 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -178,7 +178,7 @@ static uint8_t getMinVisibility(uint8_t VA, uint8_t VB) { } // 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 @@ std::pair<Symbol *, bool> SymbolTable::insert(StringRef Name, uint8_t Type, 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 @@ void SymbolTable::addLazyArchive(StringRef Name, ArchiveFile &File, 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 @@ template <class ELFT> 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/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h index 668ea0eccc2..3626bc1b000 100644 --- a/lld/ELF/SymbolTable.h +++ b/lld/ELF/SymbolTable.h @@ -71,7 +71,6 @@ public: 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 @@ public: void handleDynamicList(); private: + std::pair<Symbol *, bool> insertName(StringRef Name); + std::vector<Symbol *> findByVersion(SymbolVersion Ver); std::vector<Symbol *> findAllByVersion(SymbolVersion Ver); |

