This is an archive of the discontinued LLVM Phabricator instance.

[ObjectYAML] Add ability for DWARFYAML to calculate DIE lengths
ClosedPublic

Authored by JDevlieghere on Mar 6 2017, 2:23 PM.

Details

Summary

This patch adds the ability for the ObjectYAML DWARFEmitter to calculate the lengths of DIEs. This is accomplished by creating a DIEFixupVisitor class which traverses the DWARF DIEs to calculate and fix up the lengths in the Compile Unit header.

The DIEFixupVisitor can be extended in the future to enable more complex fix ups which will enable simplified YAML string representations.

This is also very useful when using the YAML format in unit tests because you no longer need to know the length of the compile unit when writing the YAML string.

Diff Detail

Repository
rL LLVM

Event Timeline

beanz created this revision.Mar 6 2017, 2:23 PM
JDevlieghere commandeered this revision.Apr 17 2018, 8:14 AM
JDevlieghere added a reviewer: beanz.
JDevlieghere added a subscriber: JDevlieghere.

Stealing this, as discussed :-)

davide accepted this revision.Apr 19 2018, 10:29 AM
This revision is now accepted and ready to land.Apr 19 2018, 10:29 AM
This revision was automatically updated to reflect the committed changes.