LLVM
17.0.0git
include
llvm
DebugInfo
CodeView
ContinuationRecordBuilder.h
Go to the documentation of this file.
1
//===- ContinuationRecordBuilder.h ------------------------------*- 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
#ifndef LLVM_DEBUGINFO_CODEVIEW_CONTINUATIONRECORDBUILDER_H
10
#define LLVM_DEBUGINFO_CODEVIEW_CONTINUATIONRECORDBUILDER_H
11
12
#include "
llvm/ADT/ArrayRef.h
"
13
#include "
llvm/ADT/SmallVector.h
"
14
#include "
llvm/DebugInfo/CodeView/CVRecord.h
"
15
#include "
llvm/DebugInfo/CodeView/TypeRecordMapping.h
"
16
#include "
llvm/Support/BinaryByteStream.h
"
17
#include "
llvm/Support/BinaryStreamWriter.h
"
18
#include <cstdint>
19
#include <vector>
20
21
namespace
llvm
{
22
namespace
codeview {
23
class
TypeIndex;
24
enum class
ContinuationRecordKind
{
FieldList
,
MethodOverloadList
};
25
26
class
ContinuationRecordBuilder
{
27
SmallVector<uint32_t, 4>
SegmentOffsets;
28
std::optional<ContinuationRecordKind> Kind;
29
AppendingBinaryByteStream
Buffer;
30
BinaryStreamWriter
SegmentWriter;
31
TypeRecordMapping
Mapping;
32
ArrayRef<uint8_t>
InjectedSegmentBytes;
33
34
uint32_t
getCurrentSegmentLength()
const
;
35
36
void
insertSegmentEnd(
uint32_t
Offset);
37
CVType
createSegmentRecord(
uint32_t
OffBegin,
uint32_t
OffEnd,
38
std::optional<TypeIndex> RefersTo);
39
40
public
:
41
ContinuationRecordBuilder
();
42
~ContinuationRecordBuilder
();
43
44
void
begin
(
ContinuationRecordKind
RecordKind);
45
46
// This template is explicitly instantiated in the implementation file for all
47
// supported types. The method itself is ugly, so inlining it into the header
48
// file clutters an otherwise straightforward interface.
49
template
<
typename
RecordType>
void
writeMemberType
(
RecordType
&
Record
);
50
51
std::vector<CVType>
end
(
TypeIndex
Index
);
52
};
53
}
// namespace codeview
54
}
// namespace llvm
55
56
#endif
llvm::codeview::ContinuationRecordBuilder::end
std::vector< CVType > end(TypeIndex Index)
Definition:
ContinuationRecordBuilder.cpp:173
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::codeview::ContinuationRecordKind
ContinuationRecordKind
Definition:
ContinuationRecordBuilder.h:24
BinaryByteStream.h
llvm::BinaryStreamWriter
Provides write only access to a subclass of WritableBinaryStream.
Definition:
BinaryStreamWriter.h:30
llvm::SmallVector< uint32_t, 4 >
llvm::codeview::TypeRecordMapping
Definition:
TypeRecordMapping.h:26
llvm::codeview::ContinuationRecordBuilder::writeMemberType
void writeMemberType(RecordType &Record)
Definition:
ContinuationRecordBuilder.cpp:78
llvm::codeview::ContinuationRecordBuilder::~ContinuationRecordBuilder
~ContinuationRecordBuilder()
llvm::codeview::ContinuationRecordKind::MethodOverloadList
@ MethodOverloadList
llvm::AppendingBinaryByteStream
An implementation of WritableBinaryStream which can write at its end causing the underlying data to g...
Definition:
BinaryByteStream.h:134
llvm::dwarf::Index
Index
Definition:
Dwarf.h:550
llvm::codeview::ContinuationRecordBuilder
Definition:
ContinuationRecordBuilder.h:26
llvm::codeview::ContinuationRecordBuilder::begin
void begin(ContinuationRecordKind RecordKind)
Definition:
ContinuationRecordBuilder.cpp:51
TypeRecordMapping.h
llvm::codeview::ContinuationRecordKind::FieldList
@ FieldList
ArrayRef.h
llvm::Record
Definition:
Record.h:1577
llvm::ArrayRef< uint8_t >
llvm::codeview::CVRecord< TypeLeafKind >
uint32_t
CVRecord.h
SmallVector.h
llvm::codeview::ContinuationRecordBuilder::ContinuationRecordBuilder
ContinuationRecordBuilder()
Definition:
ContinuationRecordBuilder.cpp:46
llvm::codeview::TypeIndex
A 32-bit type reference.
Definition:
TypeIndex.h:96
BinaryStreamWriter.h
RecordType
FunctionLoweringInfo::StatepointRelocationRecord RecordType
Definition:
StatepointLowering.cpp:77
Generated on Sat Jan 28 2023 08:45:45 for LLVM by
1.8.17