LCOV - code coverage report
Current view: top level - include/llvm/DebugInfo/CodeView - DebugFrameDataSubsection.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 6 6 100.0 %
Date: 2017-09-14 15:23:50 Functions: 2 4 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      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"
      17             : 
      18             : namespace llvm {
      19             : namespace codeview {
      20          42 : class DebugFrameDataSubsectionRef final : public DebugSubsectionRef {
      21             : public:
      22             :   DebugFrameDataSubsectionRef()
      23          63 :       : DebugSubsectionRef(DebugSubsectionKind::FrameData) {}
      24             :   static bool classof(const DebugSubsection *S) {
      25             :     return S->kind() == DebugSubsectionKind::FrameData;
      26             :   }
      27             : 
      28             :   Error initialize(BinaryStreamReader Reader);
      29             : 
      30          42 :   FixedStreamArray<FrameData>::Iterator begin() const { return Frames.begin(); }
      31          42 :   FixedStreamArray<FrameData>::Iterator end() const { return Frames.end(); }
      32             : 
      33             :   const void *getRelocPtr() const { return RelocPtr; }
      34             : 
      35             : private:
      36             :   const uint32_t *RelocPtr = nullptr;
      37             :   FixedStreamArray<FrameData> Frames;
      38             : };
      39             : 
      40           2 : class DebugFrameDataSubsection final : public DebugSubsection {
      41             : public:
      42             :   DebugFrameDataSubsection()
      43           3 :       : DebugSubsection(DebugSubsectionKind::FrameData) {}
      44             :   static bool classof(const DebugSubsection *S) {
      45             :     return S->kind() == DebugSubsectionKind::FrameData;
      46             :   }
      47             : 
      48             :   uint32_t calculateSerializedSize() const override;
      49             :   Error commit(BinaryStreamWriter &Writer) const override;
      50             : 
      51             :   void addFrameData(const FrameData &Frame);
      52             :   void setFrames(ArrayRef<FrameData> Frames);
      53             : 
      54             : private:
      55             :   std::vector<FrameData> Frames;
      56             : };
      57             : }
      58             : }
      59             : 
      60             : #endif

Generated by: LCOV version 1.13