LLVM  7.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);
37 
38  Error reload();
39 
40  uint32_t signature() const { return Signature; }
41 
43  symbols(bool *HadError) const;
44 
45  const codeview::CVSymbolArray &getSymbolArray() const { return SymbolArray; }
46 
51 
53 
56  return Subsections;
57  }
58 
59  bool hasDebugSubsections() const;
60 
61  Error commit();
62 
65 
66 private:
67  const DbiModuleDescriptor &Mod;
68 
69  uint32_t Signature;
70 
71  std::shared_ptr<msf::MappedBlockStream> Stream;
72 
73  codeview::CVSymbolArray SymbolArray;
74 
75  BinarySubstreamRef SymbolsSubstream;
76  BinarySubstreamRef C11LinesSubstream;
77  BinarySubstreamRef C13LinesSubstream;
78  BinarySubstreamRef GlobalRefsSubstream;
79 
81 };
82 
83 } // end namespace pdb
84 } // end namespace llvm
85 
86 #endif // LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
ModuleDebugStreamRef(const DbiModuleDescriptor &Module, std::unique_ptr< msf::MappedBlockStream > Stream)
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
A Module instance is used to store all the information related to an LLVM module. ...
Definition: Module.h:63
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
ModuleDebugStreamRef & operator=(ModuleDebugStreamRef &&Other)=default
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ELFYAML::ELF_STO Other
Definition: ELFYAML.cpp:773
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:157