LLVM 22.0.0git
DebugFrameDataSubsection.h
Go to the documentation of this file.
1//===- DebugFrameDataSubsection.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_DEBUGFRAMEDATASUBSECTION_H
10#define LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
11
17#include "llvm/Support/Endian.h"
18#include "llvm/Support/Error.h"
19
20namespace llvm {
21class BinaryStreamReader;
22class BinaryStreamWriter;
23
24namespace codeview {
26public:
29 static bool classof(const DebugSubsection *S) {
31 }
32
35
36 FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
37 FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
38
39 const support::ulittle32_t *getRelocPtr() const { return RelocPtr; }
40
41private:
42 const support::ulittle32_t *RelocPtr = nullptr;
44};
45
47public:
48 DebugFrameDataSubsection(bool IncludeRelocPtr)
50 IncludeRelocPtr(IncludeRelocPtr) {}
51 static bool classof(const DebugSubsection *S) {
52 return S->kind() == DebugSubsectionKind::FrameData;
53 }
54
55 uint32_t calculateSerializedSize() const override;
56 Error commit(BinaryStreamWriter &Writer) const override;
57
58 void addFrameData(const FrameData &Frame);
60
61private:
62 bool IncludeRelocPtr = false;
63 std::vector<FrameData> Frames;
64};
65}
66}
67
68#endif
Lightweight arrays that are backed by an arbitrary BinaryStream.
#define LLVM_ABI
Definition: Compiler.h:213
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
Provides read only access to a subclass of BinaryStream.
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
static bool classof(const DebugSubsection *S)
const support::ulittle32_t * getRelocPtr() const
LLVM_ABI Error initialize(BinaryStreamReader Reader)
FixedStreamArray< FrameData >::Iterator begin() const
FixedStreamArray< FrameData >::Iterator end() const
void setFrames(ArrayRef< FrameData > Frames)
static bool classof(const DebugSubsection *S)
DebugSubsectionKind kind() const
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:558