[PATCH] D64033: Add column info for inline sites

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 14:00:37 PDT 2019


wenlei created this revision.
wenlei added a reviewer: echristo.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

The column field is missing for all inline sites, currently it's always zero. This changes populates DW_AT_call_column field for inline sites. Test case modified to cover this change.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64033

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/test/DebugInfo/Inputs/gmlt.ll
  llvm/test/DebugInfo/X86/fission-inline.ll


Index: llvm/test/DebugInfo/X86/fission-inline.ll
===================================================================
--- llvm/test/DebugInfo/X86/fission-inline.ll
+++ llvm/test/DebugInfo/X86/fission-inline.ll
@@ -70,6 +70,7 @@
 ; CHECK-NOT: {{DW_AT|DW_TAG|NULL}}
 ; CHECK:     DW_AT_call_file
 ; CHECK-NEXT:     DW_AT_call_line {{.*}} (18)
+; CHECK-NEXT:     DW_AT_call_column {{.*}} (0x05)
 ; CHECK-NOT: DW_
 ; CHECK: .debug_info.dwo contents:
 
Index: llvm/test/DebugInfo/Inputs/gmlt.ll
===================================================================
--- llvm/test/DebugInfo/Inputs/gmlt.ll
+++ llvm/test/DebugInfo/Inputs/gmlt.ll
@@ -67,6 +67,7 @@
 ; CHECK-NEXT:       DW_AT_high_pc
 ; CHECK-NEXT:       DW_AT_call_file
 ; CHECK-NEXT:       DW_AT_call_line
+; CHECK-NEXT:       DW_AT_call_column
 
 ; Make sure we don't have any other subprograms here (subprograms with no
 ; inlined subroutines are omitted by design to save space)
Index: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -543,6 +543,7 @@
   addUInt(*ScopeDIE, dwarf::DW_AT_call_file, None,
           getOrCreateSourceID(IA->getFile()));
   addUInt(*ScopeDIE, dwarf::DW_AT_call_line, None, IA->getLine());
+  addUInt(*ScopeDIE, dwarf::DW_AT_call_column, None, IA->getColumn());
   if (IA->getDiscriminator() && DD->getDwarfVersion() >= 4)
     addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator, None,
             IA->getDiscriminator());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64033.207405.patch
Type: text/x-patch
Size: 1589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190701/7b8c246b/attachment.bin>


More information about the llvm-commits mailing list