LLVM  14.0.0git
CodeViewYAMLTypes.h
Go to the documentation of this file.
1 //==- CodeViewYAMLTypes.h - CodeView YAMLIO Type implementation --*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines classes for handling the YAML representation of CodeView
10 // Debug Info.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
15 #define LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
16 
17 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/Support/Allocator.h"
20 #include "llvm/Support/Error.h"
22 #include <cstdint>
23 #include <memory>
24 #include <vector>
25 
26 namespace llvm {
27 
28 namespace codeview {
29 class AppendingTypeTableBuilder;
30 }
31 
32 namespace CodeViewYAML {
33 
34 namespace detail {
35 
36 struct LeafRecordBase;
37 struct MemberRecordBase;
38 
39 } // end namespace detail
40 
41 struct MemberRecord {
42  std::shared_ptr<detail::MemberRecordBase> Member;
43 };
44 
45 struct LeafRecord {
46  std::shared_ptr<detail::LeafRecordBase> Leaf;
47 
51 };
52 
53 std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugTorP,
57 
58 } // end namespace CodeViewYAML
59 
60 } // end namespace llvm
61 
63 
64 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord)
65 LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord)
66 
67 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord)
68 LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord)
69 
70 #endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
LLVM_YAML_DECLARE_MAPPING_TRAITS
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::codeview::AppendingTypeTableBuilder
Definition: AppendingTypeTableBuilder.h:26
llvm::CodeViewYAML::fromDebugT
std::vector< LeafRecord > fromDebugT(ArrayRef< uint8_t > DebugTorP, StringRef SectionName)
Definition: CodeViewYAMLTypes.cpp:781
Allocator.h
Error.h
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::CodeViewYAML::toDebugT
ArrayRef< uint8_t > toDebugT(ArrayRef< LeafRecord >, BumpPtrAllocator &Alloc, StringRef SectionName)
Definition: CodeViewYAMLTypes.cpp:801
LLVM_YAML_DECLARE_SCALAR_TRAITS
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote)
llvm::CodeViewYAML::MemberRecord::Member
std::shared_ptr< detail::MemberRecordBase > Member
Definition: CodeViewYAMLTypes.h:42
TypeRecord.h
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:67
ArrayRef.h
llvm::CodeViewYAML::LeafRecord::fromCodeViewRecord
static Expected< LeafRecord > fromCodeViewRecord(codeview::CVType Type)
Definition: CodeViewYAMLTypes.cpp:684
llvm::CodeViewYAML::LeafRecord::toCodeViewRecord
codeview::CVType toCodeViewRecord(codeview::AppendingTypeTableBuilder &Serializer) const
Definition: CodeViewYAMLTypes.cpp:701
YAMLTraits.h
llvm::ArrayRef< uint8_t >
llvm::CodeViewYAML::MemberRecord
Definition: CodeViewYAMLTypes.h:41
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::codeview::CVRecord< TypeLeafKind >
llvm::pdb::Single
@ Single
Definition: PDBTypes.h:400
llvm::SectionName
Definition: DWARFSection.h:21
llvm::CodeViewYAML::LeafRecord
Definition: CodeViewYAMLTypes.h:45
llvm::CodeViewYAML::LeafRecord::Leaf
std::shared_ptr< detail::LeafRecordBase > Leaf
Definition: CodeViewYAMLTypes.h:46