From: Fangrui Song Date: Tue, 13 Nov 2018 20:18:08 +0000 (+0000) Subject: [AsmPrinter] Rename a comment of .debug_gnu_pubnames entry X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8fd0ec0329de1181d47eca073843ca2b80e2acc;p=platform%2Fupstream%2Fllvm.git [AsmPrinter] Rename a comment of .debug_gnu_pubnames entry Summary: The comment refers to the field as "Kind:". However, in gdb, https://sourceware.org/gdb//onlinedocs/gdb/Index-Section-Format.html names it "attributes", gdb/dwarf2read.c:dw2_symtab_iter_next refers to the whole value as "cu_index_and_attrs" Change it to `Attributes:` for consistency. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: aprantl, JDevlieghere, arphaman, llvm-commits Differential Revision: https://reviews.llvm.org/D54480 llvm-svn: 346790 --- diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 9c0480f..774f7d1 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1839,8 +1839,8 @@ void DwarfDebug::emitDebugPubSection(bool GnuStyle, StringRef Name, if (GnuStyle) { dwarf::PubIndexEntryDescriptor Desc = computeIndexValue(TheU, Entity); Asm->OutStreamer->AddComment( - Twine("Kind: ") + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " + - dwarf::GDBIndexEntryLinkageString(Desc.Linkage)); + Twine("Attributes: ") + dwarf::GDBIndexEntryKindString(Desc.Kind) + + ", " + dwarf::GDBIndexEntryLinkageString(Desc.Linkage)); Asm->emitInt8(Desc.toBits()); } diff --git a/llvm/test/DebugInfo/X86/gnu-public-names.ll b/llvm/test/DebugInfo/X86/gnu-public-names.ll index 3dc639c..d7c5e86 100644 --- a/llvm/test/DebugInfo/X86/gnu-public-names.ll +++ b/llvm/test/DebugInfo/X86/gnu-public-names.ll @@ -65,7 +65,7 @@ ; } ; ASM: .section .debug_gnu_pubnames -; ASM: .byte 32 # Kind: VARIABLE, EXTERNAL +; ASM: .byte 32 # Attributes: VARIABLE, EXTERNAL ; ASM-NEXT: .asciz "global_variable" # External Name ; ASM: .section .debug_gnu_pubtypes