[llvm] 20e9fc5 - [MCDwarf] Delete unneeded DW_AT_prototyped for DW_TAG_label

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 14:28:16 PDT 2020


I think I replied a little too early. This *is* MCDwarf.cpp so my comment doesn't really add any new information.
To actually contribute something useful, it looks like your hunch was correct:

commit f7d77069ca47cab8f629e1cbe71265f035281329
Author: Kevin Enderby <enderby at apple.com>
Date:   Tue Jan 10 21:12:34 2012 +0000

    This is the matching change for the data structure name changes for the
    functional change in r147860 to use DW_TAG_label's instead TAG_subprogram's.
    This only changes names and updates comments.  No functional change.
    
    llvm-svn: 147877



> On May 26, 2020, at 2:09 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
> 
> On Tue, May 26, 2020 at 2:02 PM Adrian Prantl <aprantl at apple.com <mailto:aprantl at apple.com>> wrote:
> 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).
> 
> Not sure I follow your comment, sorry - could you rephrase/describe your perspective in more detail?
>  
> 
> -- adrian
> 
>> On May 26, 2020, at 1:57 PM, David Blaikie <dblaikie at gmail.com <mailto:dblaikie at gmail.com>> wrote:
>> 
>> 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? 
>> 
>> On Mon, May 25, 2020 at 3:00 PM Fangrui Song via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>> 
>> Author: Fangrui Song
>> Date: 2020-05-24T22:24:24-07:00
>> New Revision: 20e9fc55feb58dd1f766a494c530684011291ff3
>> 
>> URL: https://github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3 <https://github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3>
>> DIFF: https://github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3.diff <https://github.com/llvm/llvm-project/commit/20e9fc55feb58dd1f766a494c530684011291ff3.diff>
>> 
>> LOG: [MCDwarf] Delete unneeded DW_AT_prototyped for DW_TAG_label
>> 
>> Added: 
>> 
>> 
>> Modified: 
>>     llvm/lib/MC/MCDwarf.cpp
>>     llvm/test/MC/MachO/gen-dwarf.s
>> 
>> Removed: 
>> 
>> 
>> 
>> ################################################################################
>> diff  --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
>> index 0b7fc4554018..71b8f0e28e1c 100644
>> --- a/llvm/lib/MC/MCDwarf.cpp
>> +++ b/llvm/lib/MC/MCDwarf.cpp
>> @@ -846,7 +846,6 @@ static void EmitGenDwarfAbbrev(MCStreamer *MCOS) {
>>    EmitAbbrev(MCOS, dwarf::DW_AT_decl_file, dwarf::DW_FORM_data4);
>>    EmitAbbrev(MCOS, dwarf::DW_AT_decl_line, dwarf::DW_FORM_data4);
>>    EmitAbbrev(MCOS, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr);
>> -  EmitAbbrev(MCOS, dwarf::DW_AT_prototyped, dwarf::DW_FORM_flag);
>>    EmitAbbrev(MCOS, 0, 0);
>> 
>>    // DW_TAG_unspecified_parameters DIE abbrev (3).
>> @@ -1087,9 +1086,6 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
>>                                               MCSymbolRefExpr::VK_None, context);
>>      MCOS->emitValue(AT_low_pc, AddrSize);
>> 
>> -    // DW_AT_prototyped, a one byte flag value of 0 saying we have no prototype.
>> -    MCOS->emitInt8(0);
>> -
>>      // The DW_TAG_unspecified_parameters DIE abbrev (3).
>>      MCOS->emitULEB128IntValue(3);
>> 
>> 
>> diff  --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s
>> index 6d39d278e818..58f8a7ccf899 100644
>> --- a/llvm/test/MC/MachO/gen-dwarf.s
>> +++ b/llvm/test/MC/MachO/gen-dwarf.s
>> @@ -30,7 +30,6 @@ _x:   .long 1
>>  // CHECK:      DW_AT_decl_file DW_FORM_data4
>>  // CHECK:      DW_AT_decl_line DW_FORM_data4
>>  // CHECK:      DW_AT_low_pc    DW_FORM_addr
>> -// CHECK:      DW_AT_prototyped        DW_FORM_flag
>> 
>>  // CHECK: [3] DW_TAG_unspecified_parameters    DW_CHILDREN_no
>> 
>> @@ -53,7 +52,6 @@ _x:   .long 1
>>  // CHECK:      DW_AT_decl_file ([[FILE:".*gen-dwarf.s"]])
>>  // CHECK:      DW_AT_decl_line (5)
>>  // CHECK:      DW_AT_low_pc (0x0000000000000000)
>> -// CHECK:      DW_AT_prototyped (0x00)
>> 
>>  // CHECK:      DW_TAG_unspecified_parameters
>> 
>> @@ -64,7 +62,6 @@ _x:   .long 1
>>  // CHECK:      DW_AT_decl_file ([[FILE]])
>>  // CHECK:      DW_AT_decl_line (9)
>>  // CHECK:      DW_AT_low_pc (0x0000000000000007)
>> -// CHECK:      DW_AT_prototyped (0x00)
>> 
>>  // CHECK:      DW_TAG_unspecified_parameters
>> 
>> @@ -75,7 +72,6 @@ _x:   .long 1
>>  // CHECK:      DW_AT_decl_file ([[FILE]])
>>  // CHECK:      DW_AT_decl_line (10)
>>  // CHECK:      DW_AT_low_pc (0x0000000000000007)
>> -// CHECK:      DW_AT_prototyped (0x00)
>> 
>>  // CHECK:      DW_TAG_unspecified_parameters
>> 
>> 
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200526/13458c20/attachment.html>


More information about the llvm-commits mailing list