diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 06f4c4098617..358004248373 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -36,7 +36,7 @@ using namespace lld::elf; // Returns a string to construct an error message. template std::string lld::toString(const InputSectionBase *Sec) { - // File can absent if section is synthetic. + // File can be absent if section is synthetic. std::string FileName = Sec->getFile() ? Sec->getFile()->getName() : ""; return (FileName + ":(" + Sec->Name + ")").str(); @@ -106,11 +106,6 @@ template size_t InputSectionBase::getSize() const { return Data.size(); } -// Returns a string for an error message. -template static std::string getName(SectionT *Sec) { - return (Sec->getFile()->getName() + ":(" + Sec->Name + ")").str(); -} - template typename ELFT::uint InputSectionBase::getOffset(uintX_t Offset) const { switch (kind()) {