LLVM  9.0.0svn
SymbolStream.h
Go to the documentation of this file.
1 //===- SymbolStream.cpp - PDB Symbol Stream Access --------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_DEBUGINFO_PDB_RAW_PDBSYMBOLSTREAM_H
10 #define LLVM_DEBUGINFO_PDB_RAW_PDBSYMBOLSTREAM_H
11 
13 
14 #include "llvm/Support/Error.h"
15 
16 namespace llvm {
17 namespace msf {
18 class MappedBlockStream;
19 }
20 namespace pdb {
21 class PDBFile;
22 
23 class SymbolStream {
24 public:
25  SymbolStream(std::unique_ptr<msf::MappedBlockStream> Stream);
26  ~SymbolStream();
27  Error reload();
28 
30  return SymbolRecords;
31  }
32 
33  codeview::CVSymbol readRecord(uint32_t Offset) const;
34 
36  getSymbols(bool *HadError) const;
37 
38  Error commit();
39 
40 private:
41  codeview::CVSymbolArray SymbolRecords;
42  std::unique_ptr<msf::MappedBlockStream> Stream;
43 };
44 }
45 }
46 
47 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
const codeview::CVSymbolArray & getSymbolArray() const
Definition: SymbolStream.h:29
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:157
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:30