diff options
Diffstat (limited to 'lld/ELF/SymbolTable.cpp')
| -rw-r--r-- | lld/ELF/SymbolTable.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 60a212b4182..a017df35024 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -227,6 +227,13 @@ std::pair<Symbol *, bool> SymbolTable<ELFT>::insert(StringRef &Name) { return {Sym, IsNew}; } +// Construct a string in the form of "Sym in File1 and File2". +// Used to construct an error message. +static std::string conflictMsg(SymbolBody *Existing, InputFile *NewFile) { + return maybeDemangle(Existing->getName()) + " in " + + getFilename(Existing->File) + " and " + getFilename(NewFile); +} + // Find an existing symbol or create and insert a new one, then apply the given // attributes. template <class ELFT> @@ -251,15 +258,6 @@ SymbolTable<ELFT>::insert(StringRef &Name, uint8_t Type, uint8_t Visibility, return {S, WasInserted}; } -// Construct a string in the form of "Sym in File1 and File2". -// Used to construct an error message. -template <typename ELFT> -std::string SymbolTable<ELFT>::conflictMsg(SymbolBody *Existing, - InputFile *NewFile) { - return maybeDemangle(Existing->getName()) + " in " + - getFilename(Existing->File) + " and " + getFilename(NewFile); -} - template <class ELFT> Symbol *SymbolTable<ELFT>::addUndefined(StringRef Name) { return addUndefined(Name, STB_GLOBAL, STV_DEFAULT, /*Type*/ 0, /*CanOmitFromDynSym*/ false, /*File*/ nullptr); |

