LLVM  5.0.0
PDBStringTable.h
Go to the documentation of this file.
1 //===- PDBStringTable.h - PDB String Table -----------------------*- 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_PDBSTRINGTABLE_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBSTRINGTABLE_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringRef.h"
18 #include "llvm/Support/Endian.h"
19 #include "llvm/Support/Error.h"
20 #include <cstdint>
21 #include <vector>
22 
23 namespace llvm {
24 class BinaryStreamReader;
25 
26 namespace msf {
27 class MappedBlockStream;
28 }
29 
30 namespace pdb {
31 
32 struct PDBStringTableHeader;
33 
35 public:
37 
38  uint32_t getByteSize() const;
39  uint32_t getNameCount() const;
40  uint32_t getHashVersion() const;
41  uint32_t getSignature() const;
42 
45 
47 
49 
50 private:
51  Error readHeader(BinaryStreamReader &Reader);
52  Error readStrings(BinaryStreamReader &Reader);
53  Error readHashTable(BinaryStreamReader &Reader);
54  Error readEpilogue(BinaryStreamReader &Reader);
55 
56  const PDBStringTableHeader *Header = nullptr;
59  uint32_t NameCount = 0;
60 };
61 
62 } // end namespace pdb
63 } // end namespace llvm
64 
65 #endif // LLVM_DEBUGINFO_PDB_RAW_STRINGTABLE_H
Expected< StringRef > getStringForID(uint32_t ID) const
uint32_t getByteSize() const
Error reload(BinaryStreamReader &Reader)
uint32_t getSignature() const
const codeview::DebugStringTableSubsectionRef & getStringTable() const
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
The header preceeding the /names stream.
Definition: RawTypes.h:309
FixedStreamArray< support::ulittle32_t > name_ids() const
Expected< uint32_t > getIDForString(StringRef Str) const
Represents a read-only view of a CodeView string table.
uint32_t getNameCount() const
uint32_t getHashVersion() const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
Provides read only access to a subclass of BinaryStream.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49