1 //===- DebugFrameDataSubsection.h ------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
11 #define LLVM_DEBUGINFO_CODEVIEW_DEBUGFRAMEDATASUBSECTION_H
13 #include "llvm/DebugInfo/CodeView/CodeView.h"
14 #include "llvm/DebugInfo/CodeView/DebugSubsection.h"
15 #include "llvm/Support/BinaryStreamReader.h"
16 #include "llvm/Support/Error.h"
20 class DebugFrameDataSubsectionRef final : public DebugSubsectionRef {
22 DebugFrameDataSubsectionRef()
23 : DebugSubsectionRef(DebugSubsectionKind::FrameData) {}
24 static bool classof(const DebugSubsection *S) {
25 return S->kind() == DebugSubsectionKind::FrameData;
28 Error initialize(BinaryStreamReader Reader);
30 FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
31 FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
33 const void *getRelocPtr() const { return RelocPtr; }
36 const uint32_t *RelocPtr = nullptr;
37 FixedStreamArray<FrameData> Frames;
40 class DebugFrameDataSubsection final : public DebugSubsection {
42 DebugFrameDataSubsection()
43 : DebugSubsection(DebugSubsectionKind::FrameData) {}
44 static bool classof(const DebugSubsection *S) {
45 return S->kind() == DebugSubsectionKind::FrameData;
48 uint32_t calculateSerializedSize() const override;
49 Error commit(BinaryStreamWriter &Writer) const override;
51 void addFrameData(const FrameData &Frame);
54 std::vector<FrameData> Frames;