LLVM 22.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"
19#include <cstdint>
20#include <vector>
21
22namespace llvm {
23namespace codeview {
24class TypeIndex;
26
28 SmallVector<uint32_t, 4> SegmentOffsets;
29 std::optional<ContinuationRecordKind> Kind;
31 BinaryStreamWriter SegmentWriter;
32 TypeRecordMapping Mapping;
33 ArrayRef<uint8_t> InjectedSegmentBytes;
34
35 uint32_t getCurrentSegmentLength() const;
36
37 void insertSegmentEnd(uint32_t Offset);
38 CVType createSegmentRecord(uint32_t OffBegin, uint32_t OffEnd,
39 std::optional<TypeIndex> RefersTo);
40
41public:
44
45 LLVM_ABI void begin(ContinuationRecordKind RecordKind);
46
47 // This template is explicitly instantiated in the implementation file for all
48 // supported types. The method itself is ugly, so inlining it into the header
49 // file clutters an otherwise straightforward interface.
50 template <typename RecordType> void writeMemberType(RecordType &Record);
51
52 LLVM_ABI std::vector<CVType> end(TypeIndex Index);
53};
54} // namespace codeview
55} // namespace llvm
56
57#endif
#define LLVM_ABI
Definition: Compiler.h:213
uint32_t Index
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:1197
LLVM_ABI void begin(ContinuationRecordKind RecordKind)
LLVM_ABI std::vector< CVType > end(TypeIndex Index)
A 32-bit type reference.
Definition: TypeIndex.h:97
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:477