LLVM  4.0.0
TpiStream.h
Go to the documentation of this file.
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 
19 
20 #include "llvm/Support/Error.h"
21 
22 namespace llvm {
23 namespace msf {
24 class MappedBlockStream;
25 }
26 namespace pdb {
27 class PDBFile;
28 
29 class TpiStream {
30  friend class TpiStreamBuilder;
31 
32 public:
33  TpiStream(const PDBFile &File,
34  std::unique_ptr<msf::MappedBlockStream> Stream);
35  ~TpiStream();
36  Error reload();
37 
39 
40  uint32_t TypeIndexBegin() const;
41  uint32_t TypeIndexEnd() const;
42  uint32_t NumTypeRecords() const;
43  uint16_t getTypeHashStreamIndex() const;
44  uint16_t getTypeHashStreamAuxIndex() const;
45 
46  uint32_t getHashKeySize() const;
47  uint32_t NumHashBuckets() const;
51 
53 
54  Error commit();
55 
56 private:
57  Error verifyHashValues();
58 
59  const PDBFile &Pdb;
60  std::unique_ptr<msf::MappedBlockStream> Stream;
61 
62  codeview::CVTypeArray TypeRecords;
63 
64  std::unique_ptr<msf::ReadableStream> HashStream;
68 
69  const TpiStreamHeader *Header;
70 };
71 }
72 }
73 
74 #endif
msf::FixedStreamArray< support::ulittle32_t > getHashValues() const
Definition: TpiStream.cpp:158
msf::FixedStreamArray< TypeIndexOffset > getHashAdjustments() const
Definition: TpiStream.cpp:168
TpiStream(const PDBFile &File, std::unique_ptr< msf::MappedBlockStream > Stream)
Definition: TpiStream.cpp:35
iterator_range< codeview::CVTypeArray::Iterator > types(bool *HadError) const
Definition: TpiStream.cpp:173
uint16_t getTypeHashStreamIndex() const
Definition: TpiStream.cpp:146
uint32_t getHashKeySize() const
Definition: TpiStream.cpp:155
uint32_t TypeIndexEnd() const
Definition: TpiStream.cpp:140
msf::FixedStreamArray< TypeIndexOffset > getTypeIndexOffsets() const
Definition: TpiStream.cpp:163
A range adaptor for a pair of iterators.
uint16_t getTypeHashStreamAuxIndex() const
Definition: TpiStream.cpp:150
uint32_t NumHashBuckets() const
Definition: TpiStream.cpp:154
PdbRaw_TpiVer getTpiVersion() const
Definition: TpiStream.cpp:133
Lightweight error class with error context and mandatory checking.
uint32_t NumTypeRecords() const
Definition: TpiStream.cpp:142
uint32_t TypeIndexBegin() const
Definition: TpiStream.cpp:138