LLVM 20.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"
20#include "llvm/Support/Error.h"
22#include <cstdint>
23#include <memory>
24#include <vector>
25
26namespace llvm {
27
28namespace codeview {
29class AppendingTypeTableBuilder;
30}
31
32namespace CodeViewYAML {
33
34namespace detail {
35
36struct LeafRecordBase;
37struct MemberRecordBase;
38
39} // end namespace detail
40
42 std::shared_ptr<detail::MemberRecordBase> Member;
43};
44
45struct LeafRecord {
46 std::shared_ptr<detail::LeafRecordBase> Leaf;
47
51};
52
53std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugTorP,
57
58} // end namespace CodeViewYAML
59
60} // end namespace llvm
61
62LLVM_YAML_DECLARE_SCALAR_TRAITS(codeview::GUID, QuotingType::Single)
63
64LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord)
65LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord)
66
67LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord)
68LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord)
69
70#endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
This file defines the BumpPtrAllocator interface.
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote)
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:66
Tagged union holding either a T or a Error.
Definition: Error.h:481
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
std::vector< LeafRecord > fromDebugT(ArrayRef< uint8_t > DebugTorP, StringRef SectionName)
ArrayRef< uint8_t > toDebugT(ArrayRef< LeafRecord >, BumpPtrAllocator &Alloc, StringRef SectionName)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::shared_ptr< detail::LeafRecordBase > Leaf
static Expected< LeafRecord > fromCodeViewRecord(codeview::CVType Type)
codeview::CVType toCodeViewRecord(codeview::AppendingTypeTableBuilder &Serializer) const
std::shared_ptr< detail::MemberRecordBase > Member