]> granicus.if.org Git - llvm/commit
[DWARF] Set discriminator to 0 for DW_LNS_copy
authorFangrui Song <maskray@google.com>
Thu, 11 Apr 2019 02:02:44 +0000 (02:02 +0000)
committerFangrui Song <maskray@google.com>
Thu, 11 Apr 2019 02:02:44 +0000 (02:02 +0000)
commitae328c30c0fc7c75aabae7a28cb59b1a0b8a660e
treebaaf436dd45dbe88d10c70b3549d27e23a9353f0
parentf78c27b74d01fc9a4f099de5188867a17b0ccd7f
[DWARF] Set discriminator to 0 for DW_LNS_copy

Summary:
Make DW_LNS_copy set the discriminator register to 0, to conform to
DWARF 4 & 5: "Then it sets the discriminator register to 0, and sets the
basic_block, prologue_end and epilogue_begin registers to false."

Because all of DW_LNE_end_sequence, DN_LNS_copy, and special opcodes reset
discriminator to 0, we can move discriminator=0 to appendRowToMatrix.

Also, make DW_LNS_copy print before appending the row, as it is similar
to a address+=0,line+=0 special opcode, which prints before appending
the row.

Reviewers: dblaikie, probinson, aprantl

Reviewed By: dblaikie

Subscribers: danielcdh, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60364

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358148 91177308-0d34-0410-b5e6-96231b3b80d8
lib/DebugInfo/DWARF/DWARFDebugLine.cpp
test/tools/llvm-dwarfdump/X86/debug-line-dw-lns-copy.s [new file with mode: 0644]