[PATCH] D30666: [ObjectYAML] Add ability for DWARFYAML to calculate DIE lengths

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 14:23:14 PST 2017


beanz created this revision.
Herald added subscribers: jgosnell, fhahn.

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.


https://reviews.llvm.org/D30666

Files:
  include/llvm/ObjectYAML/DWARFEmitter.h
  lib/ObjectYAML/DWARFEmitter.cpp
  unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30666.90746.patch
Type: text/x-patch
Size: 4557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170306/e7b9a1ec/attachment.bin>


More information about the llvm-commits mailing list