diff options
Diffstat (limited to 'lld/COFF/Symbols.cpp')
-rw-r--r-- | lld/COFF/Symbols.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lld/COFF/Symbols.cpp b/lld/COFF/Symbols.cpp index cbdc418b0101..6bc9e4ada03a 100644 --- a/lld/COFF/Symbols.cpp +++ b/lld/COFF/Symbols.cpp @@ -111,16 +111,24 @@ StringRef DefinedRegular::getName() { // StringRefs for them (which involves lots of strlen() on the string table) // is a waste of time. if (Name.empty()) - COFFFile->getSymbolName(Sym, Name); + File->getCOFFObj()->getSymbolName(Sym, Name); return Name; } StringRef DefinedCommon::getName() { if (Name.empty()) - COFFFile->getSymbolName(Sym, Name); + File->getCOFFObj()->getSymbolName(Sym, Name); return Name; } +std::string DefinedRegular::getDebugName() { + return (getName() + " " + File->getShortName()).str(); +} + +std::string DefinedCommon::getDebugName() { + return (getName() + " " + File->getShortName()).str(); +} + ErrorOr<std::unique_ptr<InputFile>> Lazy::getMember() { auto MBRefOrErr = File->getMember(&Sym); if (auto EC = MBRefOrErr.getError()) |