debuginfo: Use symbol difference for CU length to simplify assembly reading/editing
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 10 Dec 2018 22:44:48 +0000 (22:44 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 10 Dec 2018 22:44:48 +0000 (22:44 +0000)
commitdbe67c4f1952dedcf6ca76484ef7427f2ba371e7
treec00c8c1b724676f24cb91bee472265681d267d7c
parentff5f5087e60f14cfb50df232ca06763dd57712fd
debuginfo: Use symbol difference for CU length to simplify assembly reading/editing

Mucking about simplifying a test case ( https://reviews.llvm.org/D55261 ) I stumbled across something I've hit before - that LLVM's (GCC's does too, FWIW) assembly output includes a hardcode length for a DWARF unit in its header. Instead we could emit a label difference - making the assembly easier to read/edit (though potentially at a slight (I haven't tried to observe it) performance cost of delaying/sinking the length computation into the MC layer).

Reviewers: JDevlieghere, probinson, ABataev

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

llvm-svn: 348806
llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
llvm/test/DebugInfo/X86/sections_as_references.ll