LLVM 22.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
18#include "llvm/Support/Error.h"
19#include <cstdint>
20#include <memory>
21
22namespace llvm {
23class BinaryStreamReader;
24namespace codeview {
25class DebugChecksumsSubsectionRef;
26}
27namespace msf {
28class MappedBlockStream;
29}
30namespace pdb {
31
34
35public:
37 std::unique_ptr<msf::MappedBlockStream> Stream);
41
43
44 uint32_t signature() const { return Signature; }
45
47 symbols(bool *HadError) const;
48
49 const codeview::CVSymbolArray &getSymbolArray() const { return SymbolArray; }
51 getSymbolArrayForScope(uint32_t ScopeBegin) const;
52
57
59
61
64 return Subsections;
65 }
66
67 LLVM_ABI bool hasDebugSubsections() const;
68
70
73
74private:
75 Error reloadSerialize(BinaryStreamReader &Reader);
76
78
79 uint32_t Signature;
80
81 std::shared_ptr<msf::MappedBlockStream> Stream;
82
83 codeview::CVSymbolArray SymbolArray;
84
85 BinarySubstreamRef SymbolsSubstream;
86 BinarySubstreamRef C11LinesSubstream;
87 BinarySubstreamRef C13LinesSubstream;
88 BinarySubstreamRef GlobalRefsSubstream;
89
91};
92
93} // end namespace pdb
94} // end namespace llvm
95
96#endif // LLVM_DEBUGINFO_PDB_NATIVE_MODULEDEBUGSTREAM_H
#define LLVM_ABI
Definition: Compiler.h:213
Provides read only access to a subclass of BinaryStream.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:159
Tagged union holding either a T or a Error.
Definition: Error.h:485
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
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.
LLVM_ABI iterator_range< codeview::CVSymbolArray::Iterator > symbols(bool *HadError) const
LLVM_ABI codeview::CVSymbol readSymbolAtOffset(uint32_t Offset) const
LLVM_ABI ModuleDebugStreamRef(const DbiModuleDescriptor &Module, std::unique_ptr< msf::MappedBlockStream > Stream)
LLVM_ABI bool hasDebugSubsections() const
ModuleDebugStreamRef(ModuleDebugStreamRef &&Other)=default
ModuleDebugStreamRef & operator=(ModuleDebugStreamRef &&Other)=delete
LLVM_ABI BinarySubstreamRef getSymbolsSubstream() const
codeview::DebugSubsectionArray getSubsectionsArray() const
LLVM_ABI BinarySubstreamRef getGlobalRefsSubstream() const
LLVM_ABI Expected< codeview::DebugChecksumsSubsectionRef > findChecksumsSubsection() const
LLVM_ABI BinarySubstreamRef getC11LinesSubstream() const
const codeview::CVSymbolArray & getSymbolArray() const
LLVM_ABI BinarySubstreamRef getC13LinesSubstream() const
LLVM_ABI const codeview::CVSymbolArray getSymbolArrayForScope(uint32_t ScopeBegin) const
ModuleDebugStreamRef(const ModuleDebugStreamRef &Other)=default
LLVM_ABI 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.