LLVM 20.0.0git
ModuleDebugStream.h
Go to the documentation of this file.
1//===- ModuleDebugStream.h - PDB Module Info Stream Access ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
11
17#include "llvm/Support/Error.h"
18#include <cstdint>
19#include <memory>
20
21namespace llvm {
22class BinaryStreamReader;
23namespace codeview {
24class DebugChecksumsSubsectionRef;
25}
26namespace msf {
27class MappedBlockStream;
28}
29namespace pdb {
30
33
34public:
36 std::unique_ptr<msf::MappedBlockStream> Stream);
40
41 Error reload();
42
43 uint32_t signature() const { return Signature; }
44
46 symbols(bool *HadError) const;
47
48 const codeview::CVSymbolArray &getSymbolArray() const { return SymbolArray; }
50 getSymbolArrayForScope(uint32_t ScopeBegin) const;
51
56
58
60
63 return Subsections;
64 }
65
66 bool hasDebugSubsections() const;
67
68 Error commit();
69
72
73private:
74 Error reloadSerialize(BinaryStreamReader &Reader);
75
77
78 uint32_t Signature;
79
80 std::shared_ptr<msf::MappedBlockStream> Stream;
81
82 codeview::CVSymbolArray SymbolArray;
83
84 BinarySubstreamRef SymbolsSubstream;
85 BinarySubstreamRef C11LinesSubstream;
86 BinarySubstreamRef C13LinesSubstream;
87 BinarySubstreamRef GlobalRefsSubstream;
88
90};
91
92} // end namespace pdb
93} // end namespace llvm
94
95#endif // LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
Provides read only access to a subclass of BinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Tagged union holding either a T or a Error.
Definition: Error.h:481
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:65
VarStreamArray represents an array of variable length records backed by a stream.
VarStreamArrayIterator< DebugSubsectionRecord, VarStreamArrayExtractor< DebugSubsectionRecord > > Iterator
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Definition: CVRecord.h:29
A range adaptor for a pair of iterators.
iterator_range< codeview::CVSymbolArray::Iterator > symbols(bool *HadError) const
codeview::CVSymbol readSymbolAtOffset(uint32_t Offset) const
ModuleDebugStreamRef(ModuleDebugStreamRef &&Other)=default
ModuleDebugStreamRef & operator=(ModuleDebugStreamRef &&Other)=delete
BinarySubstreamRef getSymbolsSubstream() const
codeview::DebugSubsectionArray getSubsectionsArray() const
BinarySubstreamRef getGlobalRefsSubstream() const
Expected< codeview::DebugChecksumsSubsectionRef > findChecksumsSubsection() const
ModuleDebugStreamRef(const DbiModuleDescriptor &Module, std::unique_ptr< msf::MappedBlockStream > Stream)
BinarySubstreamRef getC11LinesSubstream() const
const codeview::CVSymbolArray & getSymbolArray() const
BinarySubstreamRef getC13LinesSubstream() const
const codeview::CVSymbolArray getSymbolArrayForScope(uint32_t ScopeBegin) const
ModuleDebugStreamRef(const ModuleDebugStreamRef &Other)=default
iterator_range< DebugSubsectionIterator > subsections() const
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Other
Any other memory.