[PATCH] D33155: [DWARFv5] Support FORM_strp in the line table header

Robinson, Paul via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 16:39:40 PDT 2017


What about a common/trivial base type that the unit could derive from (essentially making FormValueHelper a base of DWARF*Unit - again, might be good to find a more general name for it). That way DWARF*Units wouldn't have to be remassaged into the FormValueHelper.

Alternatively composition - have the DWARF*Unit have a FormValueHelper as a member to store these things, and could return a reference to that for form evaluations.

I'll take a crack at solving it that way, sure.

Seems to me like it'd be good to ensure the functionality is general - if accessing the string extractor from the context isn't sufficiently general, perhaps the DWARFFormValue should hold a pointer/reference (or perhaps copy - have to consider the lifetime implications, etc) of the FormValueHelper.

Because there is a line table in the .dwo file, for type units - so sounds like it'd be necessary to support these forms there as well.

Quite true, and in fact the set of allowed forms for .debug_line.dwo is bigger—it can use the DW_FORM_strx* forms, which means it has to have access to the .debug_str_offsets.dwo section too.
--paulr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170619/7053d821/attachment.html>


More information about the llvm-commits mailing list