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

          Line data    Source code
       1             : //===- TpiStream.cpp - PDB Type Info (TPI) Stream 2 Access ------*- 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_PDB_RAW_PDBTPISTREAM_H
      11             : #define LLVM_DEBUGINFO_PDB_RAW_PDBTPISTREAM_H
      12             : 
      13             : #include "llvm/DebugInfo/CodeView/TypeRecord.h"
      14             : #include "llvm/DebugInfo/PDB/Native/HashTable.h"
      15             : #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
      16             : #include "llvm/DebugInfo/PDB/Native/RawTypes.h"
      17             : #include "llvm/DebugInfo/PDB/PDBTypes.h"
      18             : #include "llvm/Support/BinaryStreamArray.h"
      19             : #include "llvm/Support/BinaryStreamRef.h"
      20             : #include "llvm/Support/raw_ostream.h"
      21             : 
      22             : #include "llvm/Support/Error.h"
      23             : 
      24             : namespace llvm {
      25             : namespace codeview {
      26             : class LazyRandomTypeCollection;
      27             : }
      28             : namespace msf {
      29             : class MappedBlockStream;
      30             : }
      31             : namespace pdb {
      32             : class PDBFile;
      33             : 
      34         164 : class TpiStream {
      35             :   friend class TpiStreamBuilder;
      36             : 
      37             : public:
      38             :   TpiStream(PDBFile &File, std::unique_ptr<msf::MappedBlockStream> Stream);
      39             :   ~TpiStream();
      40             :   Error reload();
      41             : 
      42             :   PdbRaw_TpiVer getTpiVersion() const;
      43             : 
      44             :   uint32_t TypeIndexBegin() const;
      45             :   uint32_t TypeIndexEnd() const;
      46             :   uint32_t getNumTypeRecords() const;
      47             :   uint16_t getTypeHashStreamIndex() const;
      48             :   uint16_t getTypeHashStreamAuxIndex() const;
      49             : 
      50             :   uint32_t getHashKeySize() const;
      51             :   uint32_t getNumHashBuckets() const;
      52             :   FixedStreamArray<support::ulittle32_t> getHashValues() const;
      53             :   FixedStreamArray<codeview::TypeIndexOffset> getTypeIndexOffsets() const;
      54             :   HashTable<support::ulittle32_t> &getHashAdjusters();
      55             : 
      56             :   codeview::CVTypeRange types(bool *HadError) const;
      57          76 :   const codeview::CVTypeArray &typeArray() const { return TypeRecords; }
      58             : 
      59             :   codeview::LazyRandomTypeCollection &typeCollection() { return *Types; }
      60             : 
      61             :   Expected<codeview::TypeIndex>
      62             :   findFullDeclForForwardRef(codeview::TypeIndex ForwardRefTI) const;
      63             : 
      64             :   BinarySubstreamRef getTypeRecordsSubstream() const;
      65             : 
      66             :   Error commit();
      67             : 
      68             :   void buildHashMap();
      69             : 
      70             :   bool supportsTypeLookup() const;
      71             : 
      72             : private:
      73             :   PDBFile &Pdb;
      74             :   std::unique_ptr<msf::MappedBlockStream> Stream;
      75             : 
      76             :   std::unique_ptr<codeview::LazyRandomTypeCollection> Types;
      77             : 
      78             :   BinarySubstreamRef TypeRecordsSubstream;
      79             : 
      80             :   codeview::CVTypeArray TypeRecords;
      81             : 
      82             :   std::unique_ptr<BinaryStream> HashStream;
      83             :   FixedStreamArray<support::ulittle32_t> HashValues;
      84             :   FixedStreamArray<codeview::TypeIndexOffset> TypeIndexOffsets;
      85             :   HashTable<support::ulittle32_t> HashAdjusters;
      86             : 
      87             :   std::vector<std::vector<codeview::TypeIndex>> HashMap;
      88             : 
      89             :   const TpiStreamHeader *Header;
      90             : };
      91             : }
      92             : }
      93             : 
      94             : #endif

Generated by: LCOV version 1.13