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 getNumTypeRecords() const;
44 uint16_t getTypeHashStreamIndex() const;
45 uint16_t getTypeHashStreamAuxIndex() const;
47 uint32_t getHashKeySize() const;
48 uint32_t getNumHashBuckets() const;
49 FixedStreamArray<support::ulittle32_t> getHashValues() const;
50 FixedStreamArray<codeview::TypeIndexOffset> getTypeIndexOffsets() const;
51 HashTable &getHashAdjusters();
53 codeview::CVTypeRange types(bool *HadError) const;
54 const codeview::CVTypeArray &typeArray() const { return TypeRecords; }
60 std::unique_ptr<msf::MappedBlockStream> Stream;
62 codeview::CVTypeArray TypeRecords;
64 std::unique_ptr<BinaryStream> HashStream;
65 FixedStreamArray<support::ulittle32_t> HashValues;
66 FixedStreamArray<codeview::TypeIndexOffset> TypeIndexOffsets;
67 HashTable HashAdjusters;
69 const TpiStreamHeader *Header;