[DWARF] Suppress split line tables more carefully.
authorPaul Robinson <paul.robinson@sony.com>
Tue, 27 Mar 2018 21:28:59 +0000 (21:28 +0000)
committerPaul Robinson <paul.robinson@sony.com>
Tue, 27 Mar 2018 21:28:59 +0000 (21:28 +0000)
commit7cb26ad2ef0714b010269d92eb5570f6a1b619df
tree0b8c5949be20c7b3a899e28bbfbf2c6d3af6a24a
parent01bfd6c4e5c48d8f3997f12103735161e8bd09cc
[DWARF] Suppress split line tables more carefully.

If a given split type unit does not have source locations, don't have
it refer to the split line table.
If no split type unit refers to the split line table, don't emit the
line table at all.

This will save a little space on rare occasions, but also refactors
things a bit to improve which class is responsible for what.

Responding to review comments on r326395.

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

llvm-svn: 328670
llvm/include/llvm/MC/MCDwarf.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
llvm/lib/MC/MCDwarf.cpp
llvm/test/CodeGen/X86/dwarf-split-line-1.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/dwarf-split-line-2.ll [new file with mode: 0644]