LLVM  5.0.0
PublicsStream.h
Go to the documentation of this file.
1 //===- PublicsStream.h - PDB Public Symbol Stream -------- ------*- 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_PUBLICSSTREAM_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PUBLICSSTREAM_H
12 
19 #include "llvm/Support/Error.h"
20 
21 namespace llvm {
22 namespace pdb {
23 class DbiStream;
24 struct GSIHashHeader;
25 class PDBFile;
26 
28 public:
29  PublicsStream(PDBFile &File, std::unique_ptr<msf::MappedBlockStream> Stream);
31  Error reload();
32 
33  uint32_t getSymHash() const;
34  uint32_t getAddrMap() const;
35  uint32_t getNumBuckets() const { return NumBuckets; }
38  getSymbols(bool *HadError) const;
40  return HashBuckets;
41  }
43  return AddressMap;
44  }
46  return ThunkMap;
47  }
49  return SectionOffsets;
50  }
51 
52  Error commit();
53 
54 private:
55  PDBFile &Pdb;
56 
57  std::unique_ptr<msf::MappedBlockStream> Stream;
58  uint32_t NumBuckets = 0;
59  ArrayRef<uint8_t> Bitmap;
64  FixedStreamArray<SectionOffset> SectionOffsets;
65 
66  const PublicsStreamHeader *Header;
67  const GSIHashHeader *HashHdr;
68 };
69 }
70 }
71 
72 #endif
iterator_range< codeview::CVSymbolArray::Iterator > getSymbols(bool *HadError) const
Expected< const codeview::CVSymbolArray & > getSymbolArray() const
FixedStreamArray< support::ulittle32_t > getAddressMap() const
Definition: PublicsStream.h:42
Header of the hash tables found in the globals and publics sections.
Definition: GSI.h:46
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
FixedStreamArray< support::ulittle32_t > getHashBuckets() const
Definition: PublicsStream.h:39
uint32_t getSymHash() const
PublicsStream(PDBFile &File, std::unique_ptr< msf::MappedBlockStream > Stream)
FixedStreamArray< support::ulittle32_t > getThunkMap() const
Definition: PublicsStream.h:45
A range adaptor for a pair of iterators.
FixedStreamArray< SectionOffset > getSectionOffsets() const
Definition: PublicsStream.h:48
uint32_t getNumBuckets() const
Definition: PublicsStream.h:35
uint32_t getAddrMap() const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156