[PATCH] Make DIE.h a public CodeGen header.
Frederic Riss
friss at apple.com
Tue Dec 16 14:46:05 PST 2014
Hi echristo, dblaikie,
dsymutil would like to use all the AsmPrinter/MCStreamer infrastructure
to stream out the DWARF. In order to do so, it will reuse the DIE object
and so this header needs to be public.
There are a couple of issues with that:
- Although the header only depends on public interfaces, it exposes
a forward declaration of DwarfTypeUnit which is private.
- Some paths of the emission code use the DwarfDebug object stored
in AsmPrinter. In dsymutil we will have an AsmPrinter, but the
DwarfDebug object is to tied to the codegen to be reused.
Both of these issues only trigger if you actually use the functionality.
dsymutil should be able to get along without doing so, but this would
leave us with an API with some quite flaky parts.
Some ideas:
- document the flakiness and be done with it.
- try to remove the DwarfDebug adherence to DwarfDebug. Some of it is
easy (for example the Dwarf version is also stored in the MCStreamer)
but to remove it completely, we might need to us a base object to
derive DwarfDebug from. This might be a bit overengineered especially
if the functionality is unused.
http://reviews.llvm.org/D6695
Files:
include/llvm/CodeGen/DIE.h
lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DIE.h
lib/CodeGen/AsmPrinter/DIEHash.cpp
lib/CodeGen/AsmPrinter/DIEHash.h
lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
lib/CodeGen/AsmPrinter/DwarfAccelTable.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/AsmPrinter/DwarfUnit.h
unittests/CodeGen/DIEHashTest.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6695.17366.patch
Type: text/x-patch
Size: 22346 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141216/b2c470c8/attachment.bin>
More information about the llvm-commits
mailing list