This is an archive of the discontinued LLVM Phabricator instance.

Move emitDIE and emitAbbrev to AsmPrinter. NFC.
ClosedPublic

Authored by friss on Mar 2 2015, 6:04 PM.

Details

Summary

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}.

Diff Detail

Event Timeline

friss updated this revision to Diff 21071.Mar 2 2015, 6:04 PM
friss retitled this revision from to Move emitDIE and emitAbbrev to AsmPrinter. NFC..
friss added reviewers: dblaikie, echristo.
friss updated this object.
friss added a subscriber: Unknown Object (MLST).
echristo edited edge metadata.Mar 3 2015, 11:56 AM

Looks good in theory.

I'd probably rename the emitDIE and emitAbbrevs to be emitDwarfDIE etc as part of the migration.

-eric

This revision was automatically updated to reflect the committed changes.