diff options
-rw-r--r-- | lld/ELF/InputFiles.cpp | 4 | ||||
-rw-r--r-- | lld/ELF/InputFiles.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index d69a40c8cab..514bc77d2be 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -183,11 +183,11 @@ ObjFile<ELFT>::getVariableLoc(StringRef Name) { // Take file name string from line table. std::string FileName; if (!LT->getFileNameByIndex( - It->second.first /* File */, nullptr, + It->second.File, nullptr, DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath, FileName)) return None; - return std::make_pair(FileName, It->second.second /*Line*/); + return std::make_pair(FileName, It->second.Line); } // Returns source line information for a given offset diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index 42ae4e4eb5e..8b2c853132d 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -216,7 +216,11 @@ private: // single object file, so we cache debugging information in order to // parse it only once for each object file we link. std::unique_ptr<llvm::DWARFDebugLine> DwarfLine; - llvm::DenseMap<StringRef, std::pair<unsigned, unsigned>> VariableLoc; + struct VarLoc { + unsigned File; + unsigned Line; + }; + llvm::DenseMap<StringRef, VarLoc> VariableLoc; llvm::once_flag InitDwarfLine; }; |