LLVM  4.0.0
NameMap.h
Go to the documentation of this file.
1 //===- NameMap.h - PDB Name Map ---------------------------------*- 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_PDBNAMEMAP_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAP_H
12 
13 #include "llvm/ADT/StringMap.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/Support/Error.h"
16 #include <cstdint>
17 
18 namespace llvm {
19 namespace msf {
20 class StreamReader;
21 class StreamWriter;
22 }
23 namespace pdb {
24 class NameMapBuilder;
25 class NameMap {
26  friend NameMapBuilder;
27 
28 public:
29  NameMap();
30 
31  Error load(msf::StreamReader &Stream);
32 
33  bool tryGetValue(StringRef Name, uint32_t &Value) const;
34 
36 
37 private:
38  StringMap<uint32_t> Mapping;
39 };
40 
41 } // end namespace pdb
42 } // end namespace llvm
43 
44 #endif // LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAP_H
iterator_range< StringMapConstIterator< uint32_t > > entries() const
Definition: NameMap.cpp:152
Error load(msf::StreamReader &Stream)
Definition: NameMap.cpp:27
bool tryGetValue(StringRef Name, uint32_t &Value) const
Definition: NameMap.cpp:157
A range adaptor for a pair of iterators.
LLVM Value Representation.
Definition: Value.h:71
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47