LLVM  10.0.0svn
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 
15 #include "llvm/Support/Endian.h"
16 #include "llvm/Support/Error.h"
17 
18 namespace llvm {
19 namespace codeview {
21 public:
24  static bool classof(const DebugSubsection *S) {
25  return S->kind() == DebugSubsectionKind::FrameData;
26  }
27 
30 
31  FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
32  FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
33 
34  const support::ulittle32_t *getRelocPtr() const { return RelocPtr; }
35 
36 private:
37  const support::ulittle32_t *RelocPtr = nullptr;
39 };
40 
42 public:
43  DebugFrameDataSubsection(bool IncludeRelocPtr)
45  IncludeRelocPtr(IncludeRelocPtr) {}
46  static bool classof(const DebugSubsection *S) {
47  return S->kind() == DebugSubsectionKind::FrameData;
48  }
49 
50  uint32_t calculateSerializedSize() const override;
51  Error commit(BinaryStreamWriter &Writer) const override;
52 
53  void addFrameData(const FrameData &Frame);
54  void setFrames(ArrayRef<FrameData> Frames);
55 
56 private:
57  bool IncludeRelocPtr = false;
58  std::vector<FrameData> Frames;
59 };
60 }
61 }
62 
63 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:569
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:32
Provides write only access to a subclass of WritableBinaryStream.
const support::ulittle32_t * getRelocPtr() const
static bool classof(const DebugSubsection *S)
FixedStreamArray< FrameData >::Iterator begin() const
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
FixedStreamArray< FrameData >::Iterator end() const
static bool classof(const DebugSubsection *S)
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
Provides read only access to a subclass of BinaryStream.
DebugSubsectionKind kind() const