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/StreamArray.h"
14 #include "llvm/DebugInfo/CodeView/StreamRef.h"
15 #include "llvm/DebugInfo/CodeView/TypeRecord.h"
16 #include "llvm/DebugInfo/PDB/PDBTypes.h"
17 #include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h"
18 #include "llvm/DebugInfo/PDB/Raw/RawConstants.h"
19 #include "llvm/DebugInfo/PDB/Raw/RawTypes.h"
20 #include "llvm/Support/raw_ostream.h"
22 #include "llvm/Support/Error.h"
32 TpiStream(const PDBFile &File, std::unique_ptr<MappedBlockStream> Stream);
36 PdbRaw_TpiVer getTpiVersion() const;
38 uint32_t TypeIndexBegin() const;
39 uint32_t TypeIndexEnd() const;
40 uint32_t NumTypeRecords() const;
41 uint16_t getTypeHashStreamIndex() const;
42 uint16_t getTypeHashStreamAuxIndex() const;
44 uint32_t getHashKeySize() const;
45 uint32_t NumHashBuckets() const;
46 codeview::FixedStreamArray<support::ulittle32_t> getHashValues() const;
47 codeview::FixedStreamArray<TypeIndexOffset> getTypeIndexOffsets() const;
48 codeview::FixedStreamArray<TypeIndexOffset> getHashAdjustments() const;
50 iterator_range<codeview::CVTypeArray::Iterator> types(bool *HadError) const;
55 Error verifyHashValues();
58 std::unique_ptr<MappedBlockStream> Stream;
60 codeview::CVTypeArray TypeRecords;
62 std::unique_ptr<MappedBlockStream> HashStream;
63 codeview::FixedStreamArray<support::ulittle32_t> HashValues;
64 codeview::FixedStreamArray<TypeIndexOffset> TypeIndexOffsets;
65 codeview::FixedStreamArray<TypeIndexOffset> HashAdjustments;
67 const HeaderInfo *Header;