LCOV - code coverage report
Current view: top level - lib/DebugInfo/PDB/Raw - SymbolStream.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 9 11 81.8 %
Date: 2017-01-24 23:09:07 Functions: 4 5 80.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- SymbolStream.cpp - PDB Symbol Stream Access ------------------------===//
       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/PDB/Raw/SymbolStream.h"
      11             : 
      12             : #include "llvm/DebugInfo/CodeView/CodeView.h"
      13             : #include "llvm/DebugInfo/CodeView/TypeRecord.h"
      14             : #include "llvm/DebugInfo/MSF/MappedBlockStream.h"
      15             : #include "llvm/DebugInfo/MSF/StreamReader.h"
      16             : #include "llvm/DebugInfo/PDB/Raw/PDBFile.h"
      17             : #include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
      18             : #include "llvm/DebugInfo/PDB/Raw/RawError.h"
      19             : 
      20             : #include "llvm/Support/Endian.h"
      21             : 
      22             : using namespace llvm;
      23             : using namespace llvm::msf;
      24             : using namespace llvm::support;
      25             : using namespace llvm::pdb;
      26             : 
      27           2 : SymbolStream::SymbolStream(std::unique_ptr<MappedBlockStream> Stream)
      28           6 :     : Stream(std::move(Stream)) {}
      29             : 
      30           4 : SymbolStream::~SymbolStream() {}
      31             : 
      32           2 : Error SymbolStream::reload() {
      33           6 :   StreamReader Reader(*Stream);
      34             : 
      35           8 :   if (auto EC = Reader.readArray(SymbolRecords, Stream->getLength()))
      36           0 :     return EC;
      37             : 
      38           6 :   return Error::success();
      39             : }
      40             : 
      41             : iterator_range<codeview::CVSymbolArray::Iterator>
      42           2 : SymbolStream::getSymbols(bool *HadError) const {
      43          10 :   return llvm::make_range(SymbolRecords.begin(HadError), SymbolRecords.end());
      44             : }
      45             : 
      46           0 : Error SymbolStream::commit() { return Error::success(); }

Generated by: LCOV version 1.13