[PATCH] D157036: Emit a .debug_str_offsets section with dsymutil to support DW_FORM_strx in dsymutil.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 05:01:51 PDT 2023
avl accepted this revision.
avl added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM.
================
Comment at: llvm/lib/DWARFLinker/DWARFStreamer.cpp:268
+ return;
+
+ Asm->OutStreamer->switchSection(MOFI->getDwarfStrOffSection());
----------------
rastogishubham wrote:
> avl wrote:
> > should not we check here for empty StringOffsets and return?
> >
> >
> > ```
> > if (StringOffsets.empty())
> > return;
> > ```
> My thought was that if there is a DWARF5 cu, then there has to be a debug_str_offset section, but I am wrong, what if the CU doesn't have any strings?
Actually, that case(when CU does not have any string) looks very specific. Usually at least DW_TAG_compile_unit has a name. Anyway, it would still be good to not create empty table in this case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157036/new/
https://reviews.llvm.org/D157036
More information about the llvm-commits
mailing list