This is an archive of the discontinued LLVM Phabricator instance.

Make DIE.h a public CodeGen header.
ClosedPublic

Authored by friss on Dec 16 2014, 2:45 PM.

Details

Summary

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.

Diff Detail

Event Timeline

friss updated this revision to Diff 17366.Dec 16 2014, 2:45 PM
friss retitled this revision from to Make DIE.h a public CodeGen header..
friss added reviewers: echristo, dblaikie.
friss updated this object.
friss added a subscriber: Unknown Object (MLST).
dblaikie accepted this revision.Jan 5 2015, 10:28 AM
dblaikie edited edge metadata.

Sorry, thought I'd already signed off on this - but I guess it was some other header migration.

This revision is now accepted and ready to land.Jan 5 2015, 10:28 AM
This revision was automatically updated to reflect the committed changes.