<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Menlo;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@MS Gothic";
        panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">FTR, the absence of an attribute from a list in Appendix A does not mean it’s forbidden; just that it’s not usual.<o:p></o:p></p>
<p class="MsoNormal">The argument that neither gdb nor lldb look for it is more compelling, as well as observing that the flag was invariably zero.<o:p></o:p></p>
<p class="MsoNormal">(I have no objection to its removal.)<o:p></o:p></p>
<p class="MsoNormal">--paulr<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Fāng-ruì Sòng <maskray@google.com> <br>
<b>Sent:</b> Tuesday, May 26, 2020 5:53 PM<br>
<b>To:</b> David Blaikie <dblaikie@gmail.com><br>
<b>Cc:</b> Fangrui Song <llvmlistbot@llvm.org>; Robinson, Paul <paul.robinson@sony.com>; llvm-commits <llvm-commits@lists.llvm.org>; Adrian Prantl <aprantl@apple.com><br>
<b>Subject:</b> Re: [llvm] 20e9fc5 - [MCDwarf] Delete unneeded DW_AT_prototyped for DW_TAG_label<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">DWARF v5 Appendix A. Attributes by Tag (Informative) does not say DW_AT_prototyped is applicable for DW_TAG_label.<o:p></o:p></p>
<div>
<p class="MsoNormal">I have checked that neither gdb nor lldb reads DW_AT_prototyped.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">So I deleted DW_AT_prototyped.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">(I have also checked GNU as' behavior: it generates a single DW_TAG_compile_unit, There is no DW_TAG_label. However, I guess there might be some low value having DW_TAG_label.)<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, May 26, 2020 at 2:28 PM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">I think I replied a little too early. This *is* MCDwarf.cpp so my comment doesn't really add any new information.<o:p></o:p></p>
<div>
<p class="MsoNormal">To actually contribute something useful, it looks like your hunch was correct:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif;color:#AAAB25">commit f7d77069ca47cab8f629e1cbe71265f035281329<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif">Author: Kevin Enderby <<a href="mailto:enderby@apple.com" target="_blank">enderby@apple.com</a>><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif">Date:   Tue Jan 10 21:12:34 2012 +0000<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif">    This is the matching change for the data structure name changes for the<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif">    functional change in r147860 to use DW_TAG_<span style="color:white;background:black">label</span>'s instead TAG_subprogram's.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif">    This only changes names and updates comments.  No functional change.<o:p></o:p></span></p>
</div>
<p style="margin:0in;margin-bottom:.0001pt;font-stretch:normal;min-height:16px"><span style="font-family:"Menlo",serif">    <o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-family:"Menlo",serif">    llvm-svn: 147877<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Menlo",serif"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On May 26, 2020, at 2:09 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, May 26, 2020 at 2:02 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Prior to the patch that added DW_TAG_label for C labels inside of functions, I have only seen DW_TAG_label inside object files compiled from assembler. I guess there that makes the same amount of sense (though I probably would have left
 it unspecified).<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Not sure I follow your comment, sorry - could you rephrase/describe your perspective in more detail?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-- adrian<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On May 26, 2020, at 1:57 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Any sense of the history of this? I'm guessing at some point these were emitted as subprograms rather than labels, and as subprograms it made sense to include teh prototyped=false attribute? <o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, May 25, 2020 at 3:00 PM Fangrui Song via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Author: Fangrui Song<br>
Date: 2020-05-24T22:24:24-07:00<br>
New Revision: 20e9fc55feb58dd1f766a494c530684011291ff3<br>
<br>
URL: <a href="https://urldefense.com/v3/__https:/github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3__;!!JmoZiZGBv3RvKRSx!oFY6rn6q7NLaL_YAxDThAs3yQWxPJ2yZAjofKkDP62ej1h-xh78EGsykA1fF5ewvZQ$" target="_blank">
https://github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3</a><br>
DIFF: <a href="https://urldefense.com/v3/__https:/github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3.diff__;!!JmoZiZGBv3RvKRSx!oFY6rn6q7NLaL_YAxDThAs3yQWxPJ2yZAjofKkDP62ej1h-xh78EGsykA1d1z55HUg$" target="_blank">
https://github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3.diff</a><br>
<br>
LOG: [MCDwarf] Delete unneeded DW_AT_prototyped for DW_TAG_label<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
    llvm/lib/MC/MCDwarf.cpp<br>
    llvm/test/MC/MachO/gen-dwarf.s<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff  --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp<br>
index 0b7fc4554018..71b8f0e28e1c 100644<br>
--- a/llvm/lib/MC/MCDwarf.cpp<br>
+++ b/llvm/lib/MC/MCDwarf.cpp<br>
@@ -846,7 +846,6 @@ static void EmitGenDwarfAbbrev(MCStreamer *MCOS) {<br>
   EmitAbbrev(MCOS, dwarf::DW_AT_decl_file, dwarf::DW_FORM_data4);<br>
   EmitAbbrev(MCOS, dwarf::DW_AT_decl_line, dwarf::DW_FORM_data4);<br>
   EmitAbbrev(MCOS, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr);<br>
-  EmitAbbrev(MCOS, dwarf::DW_AT_prototyped, dwarf::DW_FORM_flag);<br>
   EmitAbbrev(MCOS, 0, 0);<br>
<br>
   // DW_TAG_unspecified_parameters DIE abbrev (3).<br>
@@ -1087,9 +1086,6 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,<br>
                                              MCSymbolRefExpr::VK_None, context);<br>
     MCOS->emitValue(AT_low_pc, AddrSize);<br>
<br>
-    // DW_AT_prototyped, a one byte flag value of 0 saying we have no prototype.<br>
-    MCOS->emitInt8(0);<br>
-<br>
     // The DW_TAG_unspecified_parameters DIE abbrev (3).<br>
     MCOS->emitULEB128IntValue(3);<br>
<br>
<br>
diff  --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s<br>
index 6d39d278e818..58f8a7ccf899 100644<br>
--- a/llvm/test/MC/MachO/gen-dwarf.s<br>
+++ b/llvm/test/MC/MachO/gen-dwarf.s<br>
@@ -30,7 +30,6 @@ _x:   .long 1<br>
 // CHECK:      DW_AT_decl_file DW_FORM_data4<br>
 // CHECK:      DW_AT_decl_line DW_FORM_data4<br>
 // CHECK:      DW_AT_low_pc    DW_FORM_addr<br>
-// CHECK:      DW_AT_prototyped        DW_FORM_flag<br>
<br>
 // CHECK: [3] DW_TAG_unspecified_parameters    DW_CHILDREN_no<br>
<br>
@@ -53,7 +52,6 @@ _x:   .long 1<br>
 // CHECK:      DW_AT_decl_file ([[FILE:%22.*gen-dwarf.s%22]])<br>
 // CHECK:      DW_AT_decl_line (5)<br>
 // CHECK:      DW_AT_low_pc (0x0000000000000000)<br>
-// CHECK:      DW_AT_prototyped (0x00)<br>
<br>
 // CHECK:      DW_TAG_unspecified_parameters<br>
<br>
@@ -64,7 +62,6 @@ _x:   .long 1<br>
 // CHECK:      DW_AT_decl_file ([[FILE]])<br>
 // CHECK:      DW_AT_decl_line (9)<br>
 // CHECK:      DW_AT_low_pc (0x0000000000000007)<br>
-// CHECK:      DW_AT_prototyped (0x00)<br>
<br>
 // CHECK:      DW_TAG_unspecified_parameters<br>
<br>
@@ -75,7 +72,6 @@ _x:   .long 1<br>
 // CHECK:      DW_AT_decl_file ([[FILE]])<br>
 // CHECK:      DW_AT_decl_line (10)<br>
 // CHECK:      DW_AT_low_pc (0x0000000000000007)<br>
-// CHECK:      DW_AT_prototyped (0x00)<br>
<br>
 // CHECK:      DW_TAG_unspecified_parameters<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://urldefense.com/v3/__https:/lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits__;!!JmoZiZGBv3RvKRSx!oFY6rn6q7NLaL_YAxDThAs3yQWxPJ2yZAjofKkDP62ej1h-xh78EGsykA1dGGL2dAQ$" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"MS Gothic"">宋方睿</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>