[DebugInfo] Improve new line printing in debug line verbose output
authorJames Henderson <james.henderson@sony.com>
Wed, 27 May 2020 12:53:45 +0000 (13:53 +0100)
committerJames Henderson <james.henderson@sony.com>
Tue, 9 Jun 2020 13:27:16 +0000 (14:27 +0100)
commite3547ade68232d74bffd0e126cc0ea0b3970fbf7
tree218c8aef2f32b4abcc75337ffbc8135df5f727c6
parentdbd26fe0b6ac8b33067817ef770d82afbe268c05
[DebugInfo] Improve new line printing in debug line verbose output

The new line printing for debug line verbose output was inconsistent.
For new rows in the matrix, a blank line followed, whilst the
DW_LNS_copy opcode actually resulted in two blank lines. There was also
potential inconsistency in the blank lines at the end of the table. This
patch mostly resolves these issues - no blank lines appear in the output
except for a single line after the prologue and at table end to separate
it from any subsquent table, plus some instances after error messages.

Also add a unit test for verbose output to test the fine details of new
line placement and other aspects of verbose output.

Reviewed by: dblaikie

Differential Revision: https://reviews.llvm.org/D81102
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
llvm/test/tools/llvm-dwarfdump/X86/verbose.test
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp