LCOV - code coverage report
Current view: top level - lib/DebugInfo/CodeView - DebugSymbolsSubsection.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 12 13 92.3 %
Date: 2017-09-14 15:23:50 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- DebugSymbolsSubsection.cpp -------------------------------*- 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             : #include "llvm/DebugInfo/CodeView/DebugSymbolsSubsection.h"
      11             : 
      12             : using namespace llvm;
      13             : using namespace llvm::codeview;
      14             : 
      15           9 : Error DebugSymbolsSubsectionRef::initialize(BinaryStreamReader Reader) {
      16           9 :   return Reader.readArray(Records, Reader.getLength());
      17             : }
      18             : 
      19         161 : uint32_t DebugSymbolsSubsection::calculateSerializedSize() const {
      20         161 :   return Length;
      21             : }
      22             : 
      23          80 : Error DebugSymbolsSubsection::commit(BinaryStreamWriter &Writer) const {
      24         495 :   for (const auto &Record : Records) {
      25         525 :     if (auto EC = Writer.writeBytes(Record.RecordData))
      26           0 :       return EC;
      27             :   }
      28         240 :   return Error::success();
      29             : }
      30             : 
      31         175 : void DebugSymbolsSubsection::addSymbol(CVSymbol Symbol) {
      32         175 :   Records.push_back(Symbol);
      33         175 :   Length += Symbol.length();
      34         175 : }

Generated by: LCOV version 1.13