]> granicus.if.org Git - llvm/commit
MinidumpYAML: move serialization code to MinidumpEmitter.cpp
authorPavel Labath <pavel@labath.sk>
Wed, 21 Aug 2019 11:30:48 +0000 (11:30 +0000)
committerPavel Labath <pavel@labath.sk>
Wed, 21 Aug 2019 11:30:48 +0000 (11:30 +0000)
commitc3d07af8ccef8d68990924493c307b7b8973e373
treed87ccf4dcef1bb98dde9c7d1f4caf3d1bec14745
parentd77f59243c8e5a73daa2a40cf55f48ee2a07a396
MinidumpYAML: move serialization code to MinidumpEmitter.cpp

Summary:
The code for serializing minidumps was living in MinidumpYAML.cpp
so that it would be accessible from unit tests. While this had its
advantages, it was also unfortunate because it broke symmetry with all
other yaml2obj serializers.

Fortunately, nowadays all of yaml2obj is a library, so we don't need to
do anything special. This patch improves the code consistency by moving
the serialization code to MinidumpEmitter.cpp to match the style used in
other backends. It also removes the writeAsBinary entry point in favor
of the more general convertYAML interface.

This patch is just massaging the code a bit. There shouldn't be any
functional change here.

Reviewers: jhenderson, abrachet

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369517 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ObjectYAML/MinidumpYAML.h
lib/ObjectYAML/MinidumpEmitter.cpp
lib/ObjectYAML/MinidumpYAML.cpp
unittests/ObjectYAML/MinidumpYAMLTest.cpp