LLVM  4.0.0
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  getSymbols(bool *HadError) const;
32 
33  Error commit();
34 
35 private:
36  codeview::CVSymbolArray SymbolRecords;
37  std::unique_ptr<msf::MappedBlockStream> Stream;
38 };
39 }
40 }
41 
42 #endif
SymbolStream(std::unique_ptr< msf::MappedBlockStream > Stream)
A range adaptor for a pair of iterators.
iterator_range< codeview::CVSymbolArray::Iterator > getSymbols(bool *HadError) const
Lightweight error class with error context and mandatory checking.