9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_INPUTFILE_H
26class LazyRandomTypeCollection;
37class SymbolGroupIterator;
43 std::unique_ptr<NativeSession> PdbSession;
45 std::unique_ptr<MemoryBuffer> UnknownFile;
48 using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
50 TypeCollectionPtr Types;
51 TypeCollectionPtr Ids;
53 enum TypeCollectionKind { kTypes, kIds };
55 getOrCreateTypeCollection(TypeCollectionKind Kind);
65 bool AllowUnknownFile =
false);
101 bool Append =
false)
const;
104 bool Append =
false)
const;
119 void initializeForPdb(
uint32_t Modi);
123 void rebuildChecksumMap();
127 std::shared_ptr<ModuleDebugStreamRef> DebugStream;
134 std::forward_iterator_tag, SymbolGroup> {
148 void scanToNextDebugS();
152 std::optional<object::section_iterator> SectionIter;
165template <
typename CallbackT>
168 CallbackT Callback) {
170 "Mod {0:4} | `{1}`: ",
174 return Callback(Modi, SG);
177template <
typename CallbackT>
179 CallbackT Callback) {
204template <
typename SubsectionT>
213 SubsectionT Subsection;
215 if (SS.kind() != Subsection.kind())
218 BinaryStreamReader Reader(SS.getRecordData());
219 if (auto Err = Subsection.initialize(Reader))
221 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)
LLVM_ABI SymbolGroupIterator & operator++()
SymbolGroupIterator(const SymbolGroupIterator &Other)=default
LLVM_ABI const SymbolGroup & operator*() const
SymbolGroupIterator & operator=(const SymbolGroupIterator &R)=default
LLVM_ABI SymbolGroupIterator()
LLVM_ABI bool operator==(const SymbolGroupIterator &R) const
LLVM_ABI Expected< StringRef > getNameFromChecksums(uint32_t Offset) const
LLVM_ABI Expected< StringRef > getNameFromStringTable(uint32_t Offset) const
LLVM_ABI void formatFromFileName(LinePrinter &Printer, StringRef File, bool Append=false) const
LLVM_ABI const ModuleDebugStreamRef & getPdbModuleStream() const
LLVM_ABI void formatFromChecksumsOffset(LinePrinter &Printer, uint32_t Offset, bool Append=false) const
codeview::DebugSubsectionArray getDebugSubsections() const
LLVM_ABI StringRef name() const
bool hasDebugStream() const
const InputFile & getFile() const
LLVM_ABI bool shouldDumpSymbolGroup(uint32_t Idx, const SymbolGroup &Group, const FilterOptions &Filters)
PrintScope withLabelWidth(const PrintScope &Scope, uint32_t W)
LLVM_ABI 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