diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 54fb57cf9888..db5df198a81e 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -259,9 +259,6 @@ std::string InputSectionBase::getLocation(uint64_t Offset) { // // Returns an empty string if there's no way to get line info. std::string InputSectionBase::getSrcMsg(const Symbol &Sym, uint64_t Offset) { - // Synthetic sections don't have input files. - if (!File) - return ""; return File->getSrcMsg(Sym, *this, Offset); } @@ -275,9 +272,6 @@ std::string InputSectionBase::getSrcMsg(const Symbol &Sym, uint64_t Offset) { // // path/to/foo.o:(function bar) in archive path/to/bar.a std::string InputSectionBase::getObjMsg(uint64_t Off) { - // Synthetic sections don't have input files. - if (!File) - return ("<internal>:(" + Name + "+0x" + utohexstr(Off) + ")").str(); std::string Filename = File->getName(); std::string Archive;