Index: include/llvm/Object/MachO.h =================================================================== --- include/llvm/Object/MachO.h +++ include/llvm/Object/MachO.h @@ -556,8 +556,6 @@ bool isRelocatableObject() const override; - StringRef mapDebugSectionName(StringRef Name) const override; - bool hasPageZeroSegment() const { return HasPageZeroSegment; } static bool classof(const Binary *v) { Index: include/llvm/Object/ObjectFile.h =================================================================== --- include/llvm/Object/ObjectFile.h +++ include/llvm/Object/ObjectFile.h @@ -293,9 +293,6 @@ return std::error_code(); } - /// Maps a debug section name to a standard DWARF section name. - virtual StringRef mapDebugSectionName(StringRef Name) const { return Name; } - /// True if this is a relocatable object (.o/.obj). virtual bool isRelocatableObject() const = 0; Index: lib/DebugInfo/DWARF/DWARFContext.cpp =================================================================== --- lib/DebugInfo/DWARF/DWARFContext.cpp +++ lib/DebugInfo/DWARF/DWARFContext.cpp @@ -978,10 +978,6 @@ TypesDWOSections[Section].Data = Data; } - // Map platform specific debug section names to DWARF standard section - // names. - Name = Obj.mapDebugSectionName(Name); - if (RelocatedSection == Obj.section_end()) continue; Index: lib/Object/MachOObjectFile.cpp =================================================================== --- lib/Object/MachOObjectFile.cpp +++ lib/Object/MachOObjectFile.cpp @@ -4335,9 +4335,3 @@ return make_error("Unrecognized MachO magic number", object_error::invalid_file_type); } - -StringRef MachOObjectFile::mapDebugSectionName(StringRef Name) const { - return StringSwitch(Name) - .Case("debug_str_offs", "debug_str_offsets") - .Default(Name); -}