[PATCH] Make DIE.h a public CodeGen header.

Frédéric Riss friss at apple.com
Mon Jan 5 10:09:48 PST 2015


ping

> On Dec 16, 2014, at 2:46 PM, Frederic Riss <friss at apple.com> wrote:
> 
> 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/
> <D6695.17366.patch>




More information about the llvm-commits mailing list