LLVM  8.0.0svn
DebugFrameDataSubsection.h
Go to the documentation of this file.
1 //===- DebugFrameDataSubsection.h ------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
11 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
12 
16 #include "llvm/Support/Endian.h"
17 #include "llvm/Support/Error.h"
18 
19 namespace llvm {
20 namespace codeview {
22 public:
25  static bool classof(const DebugSubsection *S) {
26  return S->kind() == DebugSubsectionKind::FrameData;
27  }
28 
31 
32  FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
33  FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
34 
35  const support::ulittle32_t *getRelocPtr() const { return RelocPtr; }
36 
37 private:
38  const support::ulittle32_t *RelocPtr = nullptr;
40 };
41 
43 public:
44  DebugFrameDataSubsection(bool IncludeRelocPtr)
46  IncludeRelocPtr(IncludeRelocPtr) {}
47  static bool classof(const DebugSubsection *S) {
48  return S->kind() == DebugSubsectionKind::FrameData;
49  }
50 
51  uint32_t calculateSerializedSize() const override;
52  Error commit(BinaryStreamWriter &Writer) const override;
53 
54  void addFrameData(const FrameData &Frame);
55  void setFrames(ArrayRef<FrameData> Frames);
56 
57 private:
58  bool IncludeRelocPtr = false;
59  std::vector<FrameData> Frames;
60 };
61 }
62 }
63 
64 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Data in the SUBSEC_FRAMEDATA subection.
Definition: CodeView.h:552
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:33
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:158
Provides read only access to a subclass of BinaryStream.
DebugSubsectionKind kind() const