LLVM  8.0.1
SymbolStream.h
Go to the documentation of this file.
1 //===- SymbolStream.cpp - PDB Symbol Stream Access --------------*- 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_PDBSYMBOLSTREAM_H
11 #define LLVM_DEBUGINFO_PDB_RAW_PDBSYMBOLSTREAM_H
12 
14 
15 #include "llvm/Support/Error.h"
16 
17 namespace llvm {
18 namespace msf {
19 class MappedBlockStream;
20 }
21 namespace pdb {
22 class PDBFile;
23 
24 class SymbolStream {
25 public:
26  SymbolStream(std::unique_ptr<msf::MappedBlockStream> Stream);
27  ~SymbolStream();
28  Error reload();
29 
31  return SymbolRecords;
32  }
33 
34  codeview::CVSymbol readRecord(uint32_t Offset) const;
35 
37  getSymbols(bool *HadError) const;
38 
39  Error commit();
40 
41 private:
42  codeview::CVSymbolArray SymbolRecords;
43  std::unique_ptr<msf::MappedBlockStream> Stream;
44 };
45 }
46 }
47 
48 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
const codeview::CVSymbolArray & getSymbolArray() const
Definition: SymbolStream.h:30
static Expected< std::vector< unsigned > > getSymbols(MemoryBufferRef Buf, raw_ostream &SymNames, bool &HasObject)
A range adaptor for a pair of iterators.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158