Index: include/llvm/DebugInfo/DWARF/DWARFContext.h =================================================================== --- include/llvm/DebugInfo/DWARF/DWARFContext.h +++ include/llvm/DebugInfo/DWARF/DWARFContext.h @@ -348,10 +348,6 @@ function_ref HandleError = defaultErrorHandler, std::string DWPName = ""); - static std::unique_ptr - create(const StringMap> &Sections, - uint8_t AddrSize, bool isLittleEndian = sys::IsLittleEndianHost); - /// Loads register info for the architecture of the provided object file. /// Improves readability of dumped DWARF expressions. Requires the caller to /// have initialized the relevant target descriptions. Index: lib/DebugInfo/DWARF/DWARFContext.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFContext.cpp +++ lib/DebugInfo/DWARF/DWARFContext.cpp @@ -1363,24 +1363,6 @@ } public: - DWARFObjInMemory(const StringMap> &Sections, - uint8_t AddrSize, bool IsLittleEndian) - : IsLittleEndian(IsLittleEndian) { - for (const auto &SecIt : Sections) { - if (StringRef *SectionData = mapSectionToMember(SecIt.first())) - *SectionData = SecIt.second->getBuffer(); - else if (SecIt.first() == "debug_info") - // Find debug_info and debug_types data by section rather than name as - // there are multiple, comdat grouped, of these sections. - InfoSections[SectionRef()].Data = SecIt.second->getBuffer(); - else if (SecIt.first() == "debug_info.dwo") - InfoDWOSections[SectionRef()].Data = SecIt.second->getBuffer(); - else if (SecIt.first() == "debug_types") - TypesSections[SectionRef()].Data = SecIt.second->getBuffer(); - else if (SecIt.first() == "debug_types.dwo") - TypesDWOSections[SectionRef()].Data = SecIt.second->getBuffer(); - } - } DWARFObjInMemory(const object::ObjectFile &Obj, const LoadedObjectInfo *L, function_ref HandleError) : IsLittleEndian(Obj.isLittleEndian()), @@ -1658,14 +1640,6 @@ return llvm::make_unique(std::move(DObj), std::move(DWPName)); } -std::unique_ptr -DWARFContext::create(const StringMap> &Sections, - uint8_t AddrSize, bool isLittleEndian) { - auto DObj = - llvm::make_unique(Sections, AddrSize, isLittleEndian); - return llvm::make_unique(std::move(DObj), ""); -} - Error DWARFContext::loadRegisterInfo(const object::ObjectFile &Obj) { // Detect the architecture from the object file. We usually don't need OS // info to lookup a target and create register info.