[PATCH] D64784: Skip zero column for inline sites
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 20:58:46 PDT 2019
wenlei updated this revision to Diff 210020.
wenlei added a comment.
Tweak test case to add coverage for zero-coloumn inline site
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64784/new/
https://reviews.llvm.org/D64784
Files:
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
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
@@ -71,6 +71,8 @@
; CHECK: DW_AT_call_file
; CHECK-NEXT: DW_AT_call_line {{.*}} (18)
; CHECK-NEXT: DW_AT_call_column {{.*}} (0x05)
+; CHECK: DW_AT_call_file
+; CHECK-NEXT: DW_AT_call_line {{.*}} (21)
; CHECK-NOT: DW_
; CHECK: .debug_info.dwo contents:
@@ -82,6 +84,7 @@
call void @_Z2f1v(), !dbg !26
call void @_Z2f1v(), !dbg !25
call void @_Z2f1v(), !dbg !28
+ call void @_Z2f1v(), !dbg !29
ret void, !dbg !29
}
@@ -122,4 +125,5 @@
!26 = !DILocation(line: 11, column: 3, scope: !11, inlinedAt: !27)
!27 = !DILocation(line: 18, column: 5, scope: !20)
!28 = !DILocation(line: 12, column: 3, scope: !11, inlinedAt: !27)
-!29 = !DILocation(line: 21, column: 1, scope: !10)
+!29 = !DILocation(line: 12, column: 3, scope: !11, inlinedAt: !30)
+!30 = !DILocation(line: 21, column: 0, scope: !10)
Index: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -543,7 +543,8 @@
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->getColumn())
+ 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: D64784.210020.patch
Type: text/x-patch
Size: 1794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/a0caac7f/attachment.bin>
More information about the llvm-commits
mailing list