LLVM 22.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"
21#include "llvm/Support/Error.h"
23#include <cstdint>
24#include <memory>
25#include <vector>
26
27namespace llvm {
28
29namespace codeview {
31}
32
33namespace CodeViewYAML {
34
35namespace detail {
36
37struct LeafRecordBase;
38struct MemberRecordBase;
39
40} // end namespace detail
41
43 std::shared_ptr<detail::MemberRecordBase> Member;
44};
45
46struct LeafRecord {
47 std::shared_ptr<detail::LeafRecordBase> Leaf;
48
53};
54
55LLVM_ABI std::vector<LeafRecord> fromDebugT(ArrayRef<uint8_t> DebugTorP,
59
60} // end namespace CodeViewYAML
61
62} // end namespace llvm
63
64LLVM_YAML_DECLARE_SCALAR_TRAITS(codeview::GUID, QuotingType::Single)
65
66LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::LeafRecord)
67LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::MemberRecord)
68
69LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::LeafRecord)
70LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::MemberRecord)
71
72#endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H
This file defines the BumpPtrAllocator interface.
#define LLVM_ABI
Definition Compiler.h:213
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.
#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
Tagged union holding either a T or a Error.
Definition Error.h:485
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
The instances of the Type class are immutable: once they are created, they are never changed.
Definition Type.h:45
LLVM_ABI std::vector< LeafRecord > fromDebugT(ArrayRef< uint8_t > DebugTorP, StringRef SectionName)
LLVM_ABI ArrayRef< uint8_t > toDebugT(ArrayRef< LeafRecord >, BumpPtrAllocator &Alloc, StringRef SectionName)
CVRecord< TypeLeafKind > CVType
Definition CVRecord.h:64
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Definition Allocator.h:383
std::shared_ptr< detail::LeafRecordBase > Leaf
static LLVM_ABI Expected< LeafRecord > fromCodeViewRecord(codeview::CVType Type)
LLVM_ABI codeview::CVType toCodeViewRecord(codeview::AppendingTypeTableBuilder &Serializer) const
std::shared_ptr< detail::MemberRecordBase > Member