LLVM  8.0.1
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 
20 #include "llvm/Support/Error.h"
21 #include <cstdint>
22 #include <memory>
23 
24 namespace llvm {
25 namespace pdb {
26 
27 class DbiModuleDescriptor;
28 
31 
32 public:
34  std::unique_ptr<msf::MappedBlockStream> Stream);
38 
39  Error reload();
40 
41  uint32_t signature() const { return Signature; }
42 
44  symbols(bool *HadError) const;
45 
46  const codeview::CVSymbolArray &getSymbolArray() const { return SymbolArray; }
48  getSymbolArrayForScope(uint32_t ScopeBegin) const;
49 
54 
56 
58 
61  return Subsections;
62  }
63 
64  bool hasDebugSubsections() const;
65 
66  Error commit();
67 
70 
71 private:
73 
74  uint32_t Signature;
75 
76  std::shared_ptr<msf::MappedBlockStream> Stream;
77 
78  codeview::CVSymbolArray SymbolArray;
79 
80  BinarySubstreamRef SymbolsSubstream;
81  BinarySubstreamRef C11LinesSubstream;
82  BinarySubstreamRef C13LinesSubstream;
83  BinarySubstreamRef GlobalRefsSubstream;
84 
86 };
87 
88 } // end namespace pdb
89 } // end namespace llvm
90 
91 #endif // LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
ModuleDebugStreamRef(const DbiModuleDescriptor &Module, std::unique_ptr< msf::MappedBlockStream > Stream)
const codeview::CVSymbolArray getSymbolArrayForScope(uint32_t ScopeBegin) const
This class represents lattice values for constants.
Definition: AllocatorList.h:24
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:65
Expected< codeview::DebugChecksumsSubsectionRef > findChecksumsSubsection() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
BinarySubstreamRef getC13LinesSubstream() const
iterator_range< DebugSubsectionIterator > subsections() const
codeview::CVSymbol readSymbolAtOffset(uint32_t Offset) const
ModuleDebugStreamRef & operator=(ModuleDebugStreamRef &&Other)=delete
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ELFYAML::ELF_STO Other
Definition: ELFYAML.cpp:784
VarStreamArrayIterator< DebugSubsectionRecord, VarStreamArrayExtractor< DebugSubsectionRecord > > Iterator
const codeview::CVSymbolArray & getSymbolArray() const
codeview::DebugSubsectionArray getSubsectionsArray() const
iterator_range< codeview::CVSymbolArray::Iterator > symbols(bool *HadError) const
VarStreamArray represents an array of variable length records backed by a stream. ...
BinarySubstreamRef getC11LinesSubstream() const
BinarySubstreamRef getSymbolsSubstream() const
A range adaptor for a pair of iterators.
BinarySubstreamRef getGlobalRefsSubstream() const
Lightweight error class with error context and mandatory checking.
Definition: Error.h:158