diff --git a/include/llvm/ObjectYAML/CodeViewYAML.h b/include/llvm/ObjectYAML/CodeViewYAML.h index 86b572ab86d..16a58ba1060 100644 --- a/include/llvm/ObjectYAML/CodeViewYAML.h +++ b/include/llvm/ObjectYAML/CodeViewYAML.h @@ -16,6 +16,7 @@ #define LLVM_OBJECTYAML_CODEVIEWYAML_H #include "llvm/DebugInfo/CodeView/CodeView.h" +#include "llvm/DebugInfo/CodeView/DebugSubsection.h" #include "llvm/DebugInfo/CodeView/SymbolDeserializer.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h" #include "llvm/DebugInfo/CodeView/SymbolSerializer.h" @@ -27,6 +28,12 @@ namespace llvm { namespace CodeViewYAML { +namespace detail { +struct C13FragmentBase; +struct LeafRecordBase; +struct MemberRecordBase; +struct SymbolRecordBase; +} namespace detail { struct MemberRecordBase; @@ -106,46 +113,17 @@ struct SymbolRecord { codeview::CVSymbol toCodeViewSymbol(BumpPtrAllocator &Allocator) const; static Expected fromCodeViewSymbol(codeview::CVSymbol Symbol); }; + +struct C13DebugSection { + std::vector Fragments; +}; } // namespace CodeViewYAML } // namespace llvm -LLVM_YAML_DECLARE_SCALAR_TRAITS(codeview::TypeIndex, false) -LLVM_YAML_DECLARE_SCALAR_TRAITS(CodeViewYAML::HexFormattedString, false) -LLVM_YAML_DECLARE_SCALAR_TRAITS(APSInt, false) - -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceLineEntry) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceColumnEntry) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceFileChecksumEntry) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceLineInfo) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceLineBlock) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceFileInfo) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::InlineeInfo) -LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::InlineeSite) - LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord) LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord) LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SymbolRecord) - -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::TypeLeafKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::SymbolKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::PointerToMemberRepresentation) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::VFTableSlotKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::CallingConvention) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::PointerKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::PointerMode) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::HfaKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::MemberAccess) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::MethodKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::WindowsRTClassKind) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::LabelType) -LLVM_YAML_DECLARE_ENUM_TRAITS(codeview::FileChecksumKind) - -LLVM_YAML_DECLARE_BITSET_TRAITS(codeview::PointerOptions) -LLVM_YAML_DECLARE_BITSET_TRAITS(codeview::LineFlags) -LLVM_YAML_DECLARE_BITSET_TRAITS(codeview::ModifierOptions) -LLVM_YAML_DECLARE_BITSET_TRAITS(codeview::FunctionOptions) -LLVM_YAML_DECLARE_BITSET_TRAITS(codeview::ClassOptions) -LLVM_YAML_DECLARE_BITSET_TRAITS(codeview::MethodOptions) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceFileInfo) LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord) LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord) diff --git a/lib/ObjectYAML/CodeViewYAML.cpp b/lib/ObjectYAML/CodeViewYAML.cpp index a12c7146cc1..227377785d7 100644 --- a/lib/ObjectYAML/CodeViewYAML.cpp +++ b/lib/ObjectYAML/CodeViewYAML.cpp @@ -34,10 +34,42 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(InlineeSite) LLVM_YAML_IS_SEQUENCE_VECTOR(InlineeInfo) LLVM_YAML_IS_SEQUENCE_VECTOR(OneMethodRecord) LLVM_YAML_IS_SEQUENCE_VECTOR(StringRef) -LLVM_YAML_IS_SEQUENCE_VECTOR(uint32_t) LLVM_YAML_IS_SEQUENCE_VECTOR(VFTableSlotKind) LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(TypeIndex) +LLVM_YAML_DECLARE_SCALAR_TRAITS(TypeIndex, false) +LLVM_YAML_DECLARE_SCALAR_TRAITS(CodeViewYAML::HexFormattedString, false) +LLVM_YAML_DECLARE_SCALAR_TRAITS(APSInt, false) + +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceLineEntry) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceColumnEntry) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceFileChecksumEntry) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceLineInfo) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::SourceLineBlock) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::InlineeInfo) +LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::InlineeSite) + +LLVM_YAML_DECLARE_ENUM_TRAITS(TypeLeafKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(SymbolKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(PointerToMemberRepresentation) +LLVM_YAML_DECLARE_ENUM_TRAITS(VFTableSlotKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(CallingConvention) +LLVM_YAML_DECLARE_ENUM_TRAITS(PointerKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(PointerMode) +LLVM_YAML_DECLARE_ENUM_TRAITS(HfaKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(MemberAccess) +LLVM_YAML_DECLARE_ENUM_TRAITS(MethodKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(WindowsRTClassKind) +LLVM_YAML_DECLARE_ENUM_TRAITS(LabelType) +LLVM_YAML_DECLARE_ENUM_TRAITS(FileChecksumKind) + +LLVM_YAML_DECLARE_BITSET_TRAITS(PointerOptions) +LLVM_YAML_DECLARE_BITSET_TRAITS(LineFlags) +LLVM_YAML_DECLARE_BITSET_TRAITS(ModifierOptions) +LLVM_YAML_DECLARE_BITSET_TRAITS(FunctionOptions) +LLVM_YAML_DECLARE_BITSET_TRAITS(ClassOptions) +LLVM_YAML_DECLARE_BITSET_TRAITS(MethodOptions) + LLVM_YAML_DECLARE_MAPPING_TRAITS(llvm::codeview::OneMethodRecord) LLVM_YAML_DECLARE_MAPPING_TRAITS(llvm::codeview::MemberPointerInfo) diff --git a/tools/llvm-pdbdump/PdbYaml.cpp b/tools/llvm-pdbdump/PdbYaml.cpp index d3a71c036f3..2cea0f5803d 100644 --- a/tools/llvm-pdbdump/PdbYaml.cpp +++ b/tools/llvm-pdbdump/PdbYaml.cpp @@ -13,7 +13,6 @@ #include "llvm/DebugInfo/CodeView/CVSymbolVisitor.h" #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h" #include "llvm/DebugInfo/CodeView/SymbolDeserializer.h" -#include "llvm/DebugInfo/CodeView/SymbolSerializer.h" #include "llvm/DebugInfo/CodeView/SymbolVisitorCallbackPipeline.h" #include "llvm/DebugInfo/CodeView/TypeSerializer.h" #include "llvm/DebugInfo/CodeView/TypeVisitorCallbackPipeline.h"