LLVM 19.0.0git
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"
18#include <cstdint>
19#include <vector>
20
21namespace llvm {
22namespace codeview {
23class TypeIndex;
25
27 SmallVector<uint32_t, 4> SegmentOffsets;
28 std::optional<ContinuationRecordKind> Kind;
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
40public:
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
This file defines the SmallVector class.
FunctionLoweringInfo::StatepointRelocationRecord RecordType
An implementation of WritableBinaryStream which can write at its end causing the underlying data to g...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
Provides write only access to a subclass of WritableBinaryStream.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1209
void begin(ContinuationRecordKind RecordKind)
std::vector< CVType > end(TypeIndex Index)
A 32-bit type reference.
Definition: TypeIndex.h:96
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:456