1 //===- CodeViewYAMLTypes.h - CodeView YAMLIO Type Record implementation ---===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines classes for handling the YAML representation of CodeView
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
16 #define LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
18 #include "llvm/DebugInfo/CodeView/CodeView.h"
19 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
20 #include "llvm/ObjectYAML/YAML.h"
23 namespace CodeViewYAML {
25 struct LeafRecordBase;
26 struct MemberRecordBase;
30 std::shared_ptr<detail::MemberRecordBase> Member;
34 std::shared_ptr<detail::LeafRecordBase> Leaf;
36 codeview::CVType toCodeViewRecord(BumpPtrAllocator &Allocator) const;
37 static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
39 } // namespace CodeViewYAML
42 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord)
43 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord)
45 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord)
46 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord)