• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
13 #include "llvm/DebugInfo/CodeView/StreamArray.h"
14 #include "llvm/DebugInfo/CodeView/SymbolRecord.h"
15 #include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h"
16 
17 #include "llvm/Support/Error.h"
18 
19 namespace llvm {
20 namespace pdb {
21 class PDBFile;
22 
23 class SymbolStream {
24 public:
25   SymbolStream(std::unique_ptr<MappedBlockStream> Stream);
26   ~SymbolStream();
27   Error reload();
28 
29   iterator_range<codeview::CVSymbolArray::Iterator>
30   getSymbols(bool *HadError) const;
31 
32   Error commit();
33 
34 private:
35   codeview::CVSymbolArray SymbolRecords;
36   std::unique_ptr<MappedBlockStream> Stream;
37 };
38 }
39 }
40 
41 #endif
42