[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:02:14 PDT 2020


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).

-- adrian

> On May 26, 2020, at 1:57 PM, David Blaikie <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/b46412e4/attachment.html>


More information about the llvm-commits mailing list