LLVM 20.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
16#include "llvm/Support/Endian.h"
17#include "llvm/Support/Error.h"
18
19namespace llvm {
20class BinaryStreamReader;
21class BinaryStreamWriter;
22
23namespace codeview {
25public:
28 static bool classof(const DebugSubsection *S) {
30 }
31
34
35 FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
36 FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
37
38 const support::ulittle32_t *getRelocPtr() const { return RelocPtr; }
39
40private:
41 const support::ulittle32_t *RelocPtr = nullptr;
43};
44
46public:
47 DebugFrameDataSubsection(bool IncludeRelocPtr)
49 IncludeRelocPtr(IncludeRelocPtr) {}
50 static bool classof(const DebugSubsection *S) {
52 }
53
54 uint32_t calculateSerializedSize() const override;
55 Error commit(BinaryStreamWriter &Writer) const override;
56
57 void addFrameData(const FrameData &Frame);
59
60private:
61 bool IncludeRelocPtr = false;
62 std::vector<FrameData> Frames;
63};
64}
65}
66
67#endif
Lightweight arrays that are backed by an arbitrary BinaryStream.
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:160
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
FixedStreamArray< FrameData >::Iterator begin() const
FixedStreamArray< FrameData >::Iterator end() const
void setFrames(ArrayRef< FrameData > Frames)
Error commit(BinaryStreamWriter &Writer) const override
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:584