1 //===- TpiStream.cpp - PDB Type Info (TPI) Stream 2 Access ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBTPISTREAM_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBTPISTREAM_H
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/raw_ostream.h"
21 #include "llvm/Support/Error.h"
25 class MappedBlockStream;
31 friend class TpiStreamBuilder;
34 TpiStream(const PDBFile &File,
35 std::unique_ptr<msf::MappedBlockStream> Stream);
39 PdbRaw_TpiVer getTpiVersion() const;
41 uint32_t TypeIndexBegin() const;
42 uint32_t TypeIndexEnd() const;
43 uint32_t NumTypeRecords() const;
44 uint16_t getTypeHashStreamIndex() const;
45 uint16_t getTypeHashStreamAuxIndex() const;
47 uint32_t getHashKeySize() const;
48 uint32_t NumHashBuckets() const;
49 FixedStreamArray<support::ulittle32_t> getHashValues() const;
50 FixedStreamArray<TypeIndexOffset> getTypeIndexOffsets() const;
51 HashTable &getHashAdjusters();
53 codeview::CVTypeRange types(bool *HadError) const;
58 Error verifyHashValues();
61 std::unique_ptr<msf::MappedBlockStream> Stream;
63 codeview::CVTypeArray TypeRecords;
65 std::unique_ptr<BinaryStream> HashStream;
66 FixedStreamArray<support::ulittle32_t> HashValues;
67 FixedStreamArray<TypeIndexOffset> TypeIndexOffsets;
68 HashTable HashAdjusters;
70 const TpiStreamHeader *Header;