<div dir="ltr">Looks like it might've been an artifact of assembly label support initially being implemented as DW_TAG_subprograms (in r146262) & then being changed to use DW_TAG_label (in r147860). Yeah, don't much see the benefit in it off-hand at least.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 18, 2019 at 2:35 PM via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> -----Original Message-----<br>
> From: llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>] On Behalf Of<br>
> Adrian Prantl via llvm-dev<br>
> Sent: Friday, January 18, 2019 5:20 PM<br>
> To: Snider, Todd<br>
> Cc: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> Subject: Re: [llvm-dev] Potential DWARF debug info bug: DW_TAG_label DIE<br>
> has a DW_AT_prototyped attribute<br>
> <br>
> <br>
> <br>
> > On Jan 18, 2019, at 1:06 PM, Snider, Todd via llvm-dev <llvm-<br>
> <a href="mailto:dev@lists.llvm.org" target="_blank">dev@lists.llvm.org</a>> wrote:<br>
> ><br>
> ><br>
> > In llvm/lib/MC/MCDwarf.cpp’s EmitGenDwarfAbbrev(), the DWARF<br>
> abbreviation declaration for a DW_TAG_label includes a DW_AT_prototyped<br>
> attribute, but the DWARF 4 specification indicates that the<br>
> DW_AT_prototyped attribute is not a valid attribute for the DW_TAG_label<br>
> debug information entry (DIE). In this case, EmitGenDwarfAbbrev() is<br>
> clearly in violation of the DWARF 4 specification.<br>
<br>
DWARF is a "permissive" standard which means it's not illegal to do this,<br>
so it might be instructive to look at the change history to see if the<br>
commit(s) that introduced it have any explanation.<br>
<br>
Offhand, though, I agree it appears to be a complete waste of space and<br>
worth taking out.<br>
--paulr<br>
<br>
> ><br>
> > However, I notice that one of the MachO lit tests is expecting the<br>
> DW_TAG_label DIE to contain a DW_AT_prototyped attribute whose value is<br>
> false (llvm/test/MC/MachO/gen-dwarf.s).<br>
> ><br>
> > Does the DW_AT_prototyped attribute sever any purpose or provide any<br>
> value in the context of a DW_TAG_label DIE?<br>
> ><br>
> > If not, I propose to remove the call to EmitAbbrev() on behalf of the<br>
> DW_AT_prototyped attribute for a DW_TAG_label in EmitGenDwarfAbbrev().<br>
> <br>
> I don't think that any Mach-O DWARF consumer depends on the presence of<br>
> DW_TAG_prototyped inside of a DW_TAG_label. The only occurrence of<br>
> DW_TAG_prototyped inside of LLDB for example is in a switch statement of<br>
> attributes that are ignored...<br>
> <br>
> Feel free to add me (and the "debug-info" group) as a reviewer for the<br>
> patch in phabricator.<br>
> <br>
> thanks,<br>
> adrian<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>