]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/DebugInfo/PDB/Raw/NameMap.h
Import tzdata 2017b
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / DebugInfo / PDB / Raw / NameMap.h
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
35   iterator_range<StringMapConstIterator<uint32_t>> entries() const;
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