[PATCH] Move emitDIE and emitAbbrev to AsmPrinter. NFC.

Frederic Riss friss at apple.com
Mon Mar 2 18:04:50 PST 2015


Hi dblaikie, echristo,

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

http://reviews.llvm.org/D8024

Files:
  include/llvm/CodeGen/AsmPrinter.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/CodeGen/AsmPrinter/DwarfFile.cpp
  lib/CodeGen/AsmPrinter/DwarfFile.h

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8024.21071.patch
Type: text/x-patch
Size: 8602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150303/9120b23b/attachment.bin>


More information about the llvm-commits mailing list