LLVM  5.0.0
ModuleDebugStream.h
Go to the documentation of this file.
1 //===- ModuleDebugStream.h - PDB Module Info 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_NATIVE_MODULEDEBUGSTREAM_H
11 #define LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
12 
19 #include "llvm/Support/Error.h"
20 #include <cstdint>
21 #include <memory>
22 
23 namespace llvm {
24 namespace pdb {
25 
26 class DbiModuleDescriptor;
27 
30 
31 public:
33  std::unique_ptr<msf::MappedBlockStream> Stream);
36 
37  Error reload();
38 
39  uint32_t signature() const { return Signature; }
40 
42  symbols(bool *HadError) const;
43 
44  const codeview::CVSymbolArray &getSymbolArray() const { return SymbolArray; }
45 
50 
52 
54 
55  bool hasDebugSubsections() const;
56 
57  Error commit();
58 
61 
62 private:
63  const DbiModuleDescriptor &Mod;
64 
65  uint32_t Signature;
66 
67  std::shared_ptr<msf::MappedBlockStream> Stream;
68 
69  codeview::CVSymbolArray SymbolArray;
70 
71  BinarySubstreamRef SymbolsSubstream;
72  BinarySubstreamRef C11LinesSubstream;
73  BinarySubstreamRef C13LinesSubstream;
74  BinarySubstreamRef GlobalRefsSubstream;
75 
77 };
78 
79 } // end namespace pdb
80 } // end namespace llvm
81 
82 #endif // LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
ModuleDebugStreamRef(const DbiModuleDescriptor &Module, std::unique_ptr< msf::MappedBlockStream > Stream)
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:63
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
ModuleDebugStreamRef & operator=(ModuleDebugStreamRef &&Other)=default
iterator_range< codeview::CVSymbolArray::Iterator > symbols(bool *HadError) const
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ELFYAML::ELF_STO Other
Definition: ELFYAML.cpp:663
VarStreamArrayIterator< DebugSubsectionRecord, VarStreamArrayExtractor< DebugSubsectionRecord > > Iterator
BinarySubstreamRef getC13LinesSubstream() const
VarStreamArray represents an array of variable length records backed by a stream. ...
A range adaptor for a pair of iterators.
iterator_range< DebugSubsectionIterator > subsections() const
const codeview::CVSymbolArray & getSymbolArray() const
BinarySubstreamRef getGlobalRefsSubstream() const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
Expected< codeview::DebugChecksumsSubsectionRef > findChecksumsSubsection() const
BinarySubstreamRef getSymbolsSubstream() const
BinarySubstreamRef getC11LinesSubstream() const