[codeview] Make obj2yaml/yaml2obj support .debug$S/T sections.
authorZachary Turner <zturner@google.com>
Wed, 14 Jun 2017 05:31:00 +0000 (05:31 +0000)
committerZachary Turner <zturner@google.com>
Wed, 14 Jun 2017 05:31:00 +0000 (05:31 +0000)
commita3da4467fa8ed514130736c6c15f01422159d00d
tree12356bbf4e58c9d059fb2899b240256e75d75a81
parentf4ea23d3a58ee23d13b719e525e0575a29e510da
[codeview] Make obj2yaml/yaml2obj support .debug$S/T sections.

This allows us to use yaml2obj and obj2yaml to round-trip CodeView
symbol and type information without having to manually specify the bytes
of the section. This makes for much easier to maintain tests. See the
tests under lld/COFF in this patch for example. Before they just said
SectionData: <blob> whereas now we can use meaningful record
descriptions. Note that it still supports the SectionData yaml field,
which could be useful for initializing a section to invalid bytes for
testing, for example.

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

llvm-svn: 305366
27 files changed:
lld/test/COFF/Inputs/pdb1.yaml
lld/test/COFF/Inputs/pdb2.yaml
lld/test/COFF/sort-debug.test
llvm/include/llvm/DebugInfo/CodeView/DebugFrameDataSubsection.h
llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionRecord.h
llvm/include/llvm/DebugInfo/CodeView/DebugSubsectionVisitor.h
llvm/include/llvm/DebugInfo/CodeView/StringsAndChecksums.h [new file with mode: 0644]
llvm/include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.h
llvm/include/llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h
llvm/include/llvm/ObjectYAML/COFFYAML.h
llvm/include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
llvm/include/llvm/ObjectYAML/CodeViewYAMLTypes.h
llvm/lib/DebugInfo/CodeView/CMakeLists.txt
llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
llvm/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp
llvm/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp
llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp [new file with mode: 0644]
llvm/lib/DebugInfo/PDB/Native/DbiModuleDescriptorBuilder.cpp
llvm/lib/DebugInfo/PDB/Native/PDBStringTableBuilder.cpp
llvm/lib/ObjectYAML/COFFYAML.cpp
llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
llvm/lib/ObjectYAML/CodeViewYAMLTypes.cpp
llvm/tools/llvm-pdbutil/LLVMOutputStyle.cpp
llvm/tools/llvm-pdbutil/YAMLOutputStyle.cpp
llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
llvm/tools/obj2yaml/coff2yaml.cpp
llvm/tools/yaml2obj/yaml2coff.cpp