LCOV - code coverage report
Current view: top level - lib/DebugInfo/PDB/Native - NativeEnumModules.cpp (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 10 10 100.0 %
Date: 2018-10-20 13:21:21 Functions: 5 5 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //==- NativeEnumModules.cpp - Native Symbol Enumerator impl ------*- 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/PDB/Native/NativeEnumModules.h"
      11             : 
      12             : #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
      13             : #include "llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h"
      14             : #include "llvm/DebugInfo/PDB/Native/NativeExeSymbol.h"
      15             : #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
      16             : #include "llvm/DebugInfo/PDB/PDBSymbol.h"
      17             : #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h"
      18             : #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
      19             : 
      20             : namespace llvm {
      21             : namespace pdb {
      22             : 
      23           6 : NativeEnumModules::NativeEnumModules(NativeSession &PDBSession, uint32_t Index)
      24           6 :     : Session(PDBSession), Index(Index) {}
      25             : 
      26          71 : uint32_t NativeEnumModules::getChildCount() const {
      27         142 :   return Session.getSymbolCache().getNumCompilands();
      28             : }
      29             : 
      30             : std::unique_ptr<PDBSymbol>
      31          62 : NativeEnumModules::getChildAtIndex(uint32_t N) const {
      32         124 :   return Session.getSymbolCache().getOrCreateCompiland(N);
      33             : }
      34             : 
      35          67 : std::unique_ptr<PDBSymbol> NativeEnumModules::getNext() {
      36          67 :   if (Index >= getChildCount())
      37             :     return nullptr;
      38          60 :   return getChildAtIndex(Index++);
      39             : }
      40             : 
      41           1 : void NativeEnumModules::reset() { Index = 0; }
      42             : 
      43             : }
      44             : }

Generated by: LCOV version 1.13