diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index d69a40c8caba..514bc77d2be1 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -183,11 +183,11 @@ ObjFile::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 42ae4e4eb5ed..8b2c853132d2 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 DwarfLine; - llvm::DenseMap> VariableLoc; + struct VarLoc { + unsigned File; + unsigned Line; + }; + llvm::DenseMap VariableLoc; llvm::once_flag InitDwarfLine; };