[PATCH] D35193: [DWARF] - Remove unused code.

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 11:07:44 PDT 2017


wolfgangp added a comment.

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.


https://reviews.llvm.org/D35193





More information about the llvm-commits mailing list