OSDN Git Service

[ObjectYAML] NFC. Refactor DWARFYAML CompileUnit dump code
authorChris Bieneman <beanz@apple.com>
Mon, 6 Mar 2017 20:52:12 +0000 (20:52 +0000)
committerChris Bieneman <beanz@apple.com>
Mon, 6 Mar 2017 20:52:12 +0000 (20:52 +0000)
commit5cd1dc4987d2558d2060dab26e31958b09e7fc26
tree14b53b573d753caca37e394767ec06bf828e8da7
parent0f756c78047735bc69ba249a9e6ed516fb4db0b6
[ObjectYAML] NFC. Refactor DWARFYAML CompileUnit dump code

Summary: This patch refactors the DWARFYAML code for dumping compile units to use a visitor pattern. Using this design will, in the future, enable the DWARF YAML code to perform analysis and mutations of the DWARF DIEs. An example of such mutations would be calculating the length of a compile unit and updating the CU's Length field before writing the DIE. This support will make it easier to craft or modify DWARF tests by hand.

Reviewers: lhames

Subscribers: mgorny, fhahn, jgosnell, aprantl, llvm-commits

Differential Revision: https://reviews.llvm.org/D30357

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297067 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ObjectYAML/CMakeLists.txt
lib/ObjectYAML/DWARFEmitter.cpp
lib/ObjectYAML/DWARFVisitor.cpp [new file with mode: 0644]
lib/ObjectYAML/DWARFVisitor.h [new file with mode: 0644]