This was added in D32779, but I think it was unused from begining,
because Name (prev name) variable is never accessed after Obj.mapDebugSectionName() call.
Looks we can remove it.
Details
Diff Detail
Event Timeline
Yikes, looks like you found a bug. The original idea was to provide a generic mechanism to map platform specific debug section names to DWARF standard names, for example for Mach-O, which limits section names to 16 characters. The Mach-O section name for .debug_str_offsets is debug_str_offs, so I was trying to map this back to debug_str_offsets (all the leading '_' and '.'s are removed at this point). The call should have gone before the "if (StringRef *SectionData =" line a few lines above, otherwise the call the MapSectionToMember() would fail for Mach-O object files with a debug_str_off section. Nobody is generating one yet, so nobody will hit it, but it's there. My bad, of course, for not adding a test for Mach-O in the first place.
Please don't commit this, I will fix it in a different review and add a test for Mach-O.