9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
25class LazyRandomTypeCollection;
36class SymbolGroupIterator;
42 std::unique_ptr<NativeSession> PdbSession;
44 std::unique_ptr<MemoryBuffer> UnknownFile;
47 using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
49 TypeCollectionPtr Types;
50 TypeCollectionPtr Ids;
52 enum TypeCollectionKind { kTypes, kIds };
54 getOrCreateTypeCollection(TypeCollectionKind Kind);
64 bool AllowUnknownFile =
false);
100 bool Append =
false)
const;
103 bool Append =
false)
const;
118 void initializeForPdb(
uint32_t Modi);
122 void rebuildChecksumMap();
126 std::shared_ptr<ModuleDebugStreamRef> DebugStream;
133 std::forward_iterator_tag, SymbolGroup> {
147 void scanToNextDebugS();
151 std::optional<object::section_iterator> SectionIter;
164template <
typename CallbackT>
167 CallbackT Callback) {
169 "Mod {0:4} | `{1}`: ",
173 return Callback(Modi, SG);
176template <
typename CallbackT>
178 CallbackT Callback) {
203template <
typename SubsectionT>
212 SubsectionT Subsection;
214 if (SS.kind() != Subsection.kind())
217 BinaryStreamReader Reader(SS.getRecordData());
218 if (auto Err = Subsection.initialize(Reader))
220 if (auto Err = Callback(Modi, SG, Subsection))
This file defines the StringMap class.
dxil pretty DXIL Metadata Pretty Printer
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file defines the PointerUnion class, which is a discriminated union of pointer types.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
Provides amortized O(1) random access to a CodeView type stream.
An efficient, type-erasing, non-owning reference to a callable.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
A range adaptor for a pair of iterators.
const FilterOptions & getFilters() const
void formatLine(const char *Fmt, Ts &&...Items)
SymbolGroupIterator & operator++()
SymbolGroupIterator(const SymbolGroupIterator &Other)=default
const SymbolGroup & operator*() const
SymbolGroupIterator & operator=(const SymbolGroupIterator &R)=default
bool operator==(const SymbolGroupIterator &R) const
Expected< StringRef > getNameFromChecksums(uint32_t Offset) const
Expected< StringRef > getNameFromStringTable(uint32_t Offset) const
void formatFromFileName(LinePrinter &Printer, StringRef File, bool Append=false) const
const ModuleDebugStreamRef & getPdbModuleStream() const
void formatFromChecksumsOffset(LinePrinter &Printer, uint32_t Offset, bool Append=false) const
codeview::DebugSubsectionArray getDebugSubsections() const
bool hasDebugStream() const
const InputFile & getFile() const
bool shouldDumpSymbolGroup(uint32_t Idx, const SymbolGroup &Group, const FilterOptions &Filters)
PrintScope withLabelWidth(const PrintScope &Scope, uint32_t W)
Expected< ModuleDebugStreamRef > getModuleDebugStream(PDBFile &File, StringRef &ModuleName, uint32_t Index)
int NumDigits(uint64_t N)
Returns the number of digits in the given integer.
Error iterateModuleSubsections(InputFile &File, const PrintScope &HeaderScope, llvm::function_ref< Error(uint32_t, const SymbolGroup &, SubsectionT &)> Callback)
Error iterateOneModule(InputFile &File, const PrintScope &HeaderScope, const SymbolGroup &SG, uint32_t Modi, CallbackT Callback)
Error iterateSymbolGroups(InputFile &Input, const PrintScope &HeaderScope, CallbackT Callback)
This is an optimization pass for GlobalISel generic memory operations.
support::detail::AlignAdapter< T > fmt_align(T &&Item, AlignStyle Where, size_t Amount, char Fill=' ')
std::optional< uint32_t > DumpModi