LLVM  15.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"
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/ADT/SmallVector.h"
19 #include <cstdint>
20 #include <vector>
21 
22 namespace llvm {
23 namespace codeview {
24 class TypeIndex;
26 
28  SmallVector<uint32_t, 4> SegmentOffsets;
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  Optional<TypeIndex> RefersTo);
40 
41 public:
44 
45  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  std::vector<CVType> end(TypeIndex Index);
53 };
54 } // namespace codeview
55 } // namespace llvm
56 
57 #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:17
Optional.h
llvm::codeview::ContinuationRecordKind
ContinuationRecordKind
Definition: ContinuationRecordBuilder.h:25
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::Optional< ContinuationRecordKind >
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::codeview::ContinuationRecordBuilder
Definition: ContinuationRecordBuilder.h:27
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:1508
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:79