[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:21:09 PDT 2019
wenlei created this revision.
wenlei added a reviewer: dblaikie.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
D64033 <https://reviews.llvm.org/D64033> added DW_AT_call_column for inline sites. However, that change wasn't aware of "-gno-column-info". To avoid adding column info when "-gno-column-info" is used, now DW_AT_call_column is only added when we have non-zero column (when "-gno-column-info" is used, column will be zero).
Test Plan:
ninja check
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64784
Files:
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
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.210016.patch
Type: text/x-patch
Size: 749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/008dbf52/attachment.bin>
More information about the llvm-commits
mailing list