LLVM  4.0.0
NameHashTable.h
Go to the documentation of this file.
1 //===- NameHashTable.h - PDB Name Hash 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_NAMEHASHTABLE_H
11 #define LLVM_DEBUGINFO_PDB_RAW_NAMEHASHTABLE_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/StringRef.h"
17 #include "llvm/Support/Endian.h"
18 #include "llvm/Support/Error.h"
19 #include <cstdint>
20 #include <vector>
21 
22 namespace llvm {
23 namespace msf {
24 class StreamReader;
25 }
26 namespace pdb {
27 
29 public:
30  NameHashTable();
31 
32  Error load(msf::StreamReader &Stream);
33 
34  uint32_t getNameCount() const { return NameCount; }
35  uint32_t getHashVersion() const { return HashVersion; }
36  uint32_t getSignature() const { return Signature; }
37 
40 
42 
43 private:
44  msf::ReadableStreamRef NamesBuffer;
46  uint32_t Signature;
47  uint32_t HashVersion;
48  uint32_t NameCount;
49 };
50 
51 } // end namespace pdb
52 } // end namespace llvm
53 
54 #endif // LLVM_DEBUGINFO_PDB_RAW_NAMEHASHTABLE_H
StringRef getStringForID(uint32_t ID) const
uint32_t getSignature() const
Definition: NameHashTable.h:36
uint32_t getIDForString(StringRef Str) const
Error load(msf::StreamReader &Stream)
uint32_t getHashVersion() const
Definition: NameHashTable.h:35
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
msf::FixedStreamArray< support::ulittle32_t > name_ids() const
uint32_t getNameCount() const
Definition: NameHashTable.h:34