From 5666b70fd0748765ecaa69950a4868cf23a16cc9 Mon Sep 17 00:00:00 2001 From: James Henderson Date: Tue, 17 Dec 2019 12:02:54 +0000 Subject: [DebugInfo] Only print a single blank line after an empty line table Commit 84a9756 added an extra blank line at the end of any line table. However, a blank line is also printed after the line table header, which meant that two blank lines in a row were being printed after a header, if there were no rows. This patch defers the post-header blank line printing until it has been determined that there are rows to print. Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D71540 --- llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/DebugInfo') diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp index 445f4bf48a7..f5b1c40024d 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -453,9 +453,9 @@ DWARFDebugLine::LineTable::LineTable() { clear(); } void DWARFDebugLine::LineTable::dump(raw_ostream &OS, DIDumpOptions DumpOptions) const { Prologue.dump(OS, DumpOptions); - OS << '\n'; if (!Rows.empty()) { + OS << '\n'; Row::dumpTableHeader(OS); for (const Row &R : Rows) { R.dump(OS); -- cgit v1.2.3