File indexing completed on 2026-05-10 08:44:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
0015 #define LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
0016
0017 #include "llvm/ADT/ArrayRef.h"
0018 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
0019 #include "llvm/Support/Allocator.h"
0020 #include "llvm/Support/Error.h"
0021 #include "llvm/Support/YAMLTraits.h"
0022 #include <cstdint>
0023 #include <memory>
0024 #include <vector>
0025
0026 namespace llvm {
0027
0028 namespace codeview {
0029 class AppendingTypeTableBuilder;
0030 }
0031
0032 namespace CodeViewYAML {
0033
0034 namespace detail {
0035
0036 struct LeafRecordBase;
0037 struct MemberRecordBase;
0038
0039 }
0040
0041 struct MemberRecord {
0042 std::shared_ptr<detail::MemberRecordBase> Member;
0043 };
0044
0045 struct LeafRecord {
0046 std::shared_ptr<detail::LeafRecordBase> Leaf;
0047
0048 codeview::CVType
0049 toCodeViewRecord(codeview::AppendingTypeTableBuilder &Serializer) const;
0050 static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
0051 };
0052
0053 std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugTorP,
0054 StringRef SectionName);
0055 ArrayRef<uint8_t> toDebugT(ArrayRef<LeafRecord>, BumpPtrAllocator &Alloc,
0056 StringRef SectionName);
0057
0058 }
0059
0060 }
0061
0062 LLVM_YAML_DECLARE_SCALAR_TRAITS(codeview::GUID, QuotingType::Single)
0063
0064 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord)
0065 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord)
0066
0067 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord)
0068 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord)
0069
0070 #endif