I would have commited taht as obvious, but I thought I'd check with you
if it doesn't break some layering between the AsmPrinter and the various
Dwarf* classes.
llvm-dsymutil wants to reuse that code, but it doesn't have a DwarfUnit or
a DwarfDebug object to call those. It has access to an AsmPrinter though.
Having emitDIE in the AsmPrinter also removes the DwarfFile dependency
on DwarfDebug, and thus the patch drops that field.
Note the the patch won't compile as such, it needs a preliminary pass of
const-correctness fix to DIE.{h,cpp}.