[lld] r285220 - Move a helper function that doesn't depend on a class out of the class.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 11:28:09 PDT 2016
Author: ruiu
Date: Wed Oct 26 13:28:08 2016
New Revision: 285220
URL: http://llvm.org/viewvc/llvm-project?rev=285220&view=rev
Log:
Move a helper function that doesn't depend on a class out of the class.
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=285220&r1=285219&r2=285220&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Wed Oct 26 13:28:08 2016
@@ -227,6 +227,13 @@ std::pair<Symbol *, bool> SymbolTable<EL
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 &Nam
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);
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=285220&r1=285219&r2=285220&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Wed Oct 26 13:28:08 2016
@@ -97,7 +97,6 @@ private:
uint8_t Visibility, bool CanOmitFromDynSym,
InputFile *File);
- std::string conflictMsg(SymbolBody *Existing, InputFile *NewFile);
void reportDuplicate(SymbolBody *Existing, InputFile *NewFile);
std::map<std::string, std::vector<SymbolBody *>> getDemangledSyms();
More information about the llvm-commits
mailing list