class SymbolCache

Declaration

class SymbolCache { /* full declaration omitted */ };

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:37

Member Variables

private llvm::pdb::NativeSession& Session
private llvm::pdb::DbiStream* Dbi = nullptr
private std::vector<std::unique_ptr<NativeRawSymbol>> Cache
Cache of all stable symbols, indexed by SymIndexId. Just because a symbol has been parsed does not imply that it will be stable and have an Id. Id allocation is an implementation, with the only guarantee being that once an Id is allocated, the symbol can be assumed to be cached.
private DenseMap<codeview::TypeIndex, llvm::pdb::SymIndexId> TypeIndexToSymbolId
For type records from the TPI stream which have been paresd and cached, stores a mapping to SymIndexId of the cached symbol.
private DenseMap<std::pair<codeview::TypeIndex, uint32_t>, llvm::pdb::SymIndexId> FieldListMembersToSymbolId
For field list members which have been parsed and cached, stores a mapping from (IndexOfClass, MemberIndex) to the corresponding SymIndexId of the cached symbol.
private std::vector<SymIndexId> Compilands
List of SymIndexIds for each compiland, indexed by compiland index as they appear in the PDB file.
private std::vector<std::unique_ptr<NativeSourceFile>> SourceFiles
List of source files, indexed by unique source file index.
private DenseMap<uint32_t, llvm::pdb::SymIndexId> FileNameOffsetToId
Map from string table offset to source file Id.
private DenseMap<uint32_t, llvm::pdb::SymIndexId> GlobalOffsetToSymbolId
Map from global symbol offset to SymIndexId.
private DenseMap<std::pair<uint32_t, uint32_t>, llvm::pdb::SymIndexId> AddressToSymbolId
Map from segment and code offset to function symbols.
private DenseMap<std::pair<uint32_t, uint32_t>, llvm::pdb::SymIndexId> AddressToPublicSymId
Map from segment and code offset to public symbols.
private DenseMap<std::pair<uint16_t, uint32_t>, llvm::pdb::SymIndexId> SymTabOffsetToSymbolId
Map from module index and symbol table offset to SymIndexId.
private DenseMap<uint16_t, std::vector<LineTableEntry>> LineTable

Method Overview

Methods

SymbolCache(llvm::pdb::NativeSession& Session,
            llvm::pdb::DbiStream* Dbi)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:124

Parameters

llvm::pdb::NativeSession& Session
llvm::pdb::DbiStream* Dbi

std::unique_ptr<IPDBEnumSymbols>
createGlobalsEnumerator(codeview::SymbolKind Kind)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:152

Parameters

codeview::SymbolKind Kind

llvm::pdb::SymIndexId createSimpleType(
    codeview::TypeIndex TI,
    codeview::ModifierOptions Mods) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:115

Parameters

codeview::TypeIndex TI
codeview::ModifierOptions Mods

template <typename ConcreteSymbolT,
          typename... Args>
llvm::pdb::SymIndexId createSymbol(
    Args&&... ConstructorArgs) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:127

Templates

ConcreteSymbolT
Args

Parameters

Args&&... ConstructorArgs

llvm::pdb::SymIndexId createSymbolForModifiedType(
    codeview::TypeIndex ModifierTI,
    codeview::CVType CVT) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:112

Parameters

codeview::TypeIndex ModifierTI
codeview::CVType CVT

template <typename ConcreteSymbolT,
          typename CVRecordT,
          typename... Args>
llvm::pdb::SymIndexId createSymbolForType(
    codeview::TypeIndex TI,
    codeview::CVType CVT,
    Args&&... ConstructorArgs) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:99

Templates

ConcreteSymbolT
CVRecordT
Args

Parameters

codeview::TypeIndex TI
codeview::CVType CVT
Args&&... ConstructorArgs

llvm::pdb::SymIndexId createSymbolPlaceholder()
    const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:92

std::unique_ptr<IPDBEnumSymbols>
createTypeEnumerator(
    std::vector<codeview::TypeLeafKind> Kinds)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:149

Parameters

std::vector<codeview::TypeLeafKind> Kinds

std::unique_ptr<IPDBEnumSymbols>
createTypeEnumerator(codeview::TypeLeafKind Kind)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:146

Parameters

codeview::TypeLeafKind Kind

std::unique_ptr<PDBSymbol>
findFunctionSymbolBySectOffset(uint32_t Sect,
                               uint32_t Offset)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:118

Parameters

uint32_t Sect
uint32_t Offset

std::unique_ptr<IPDBEnumLineNumbers>
findLineNumbersByVA(uint64_t VA,
                    uint32_t Length) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:180

Parameters

uint64_t VA
uint32_t Length

std::vector<LineTableEntry> findLineTable(
    uint16_t Modi) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:89

Parameters

uint16_t Modi

std::unique_ptr<PDBSymbol>
findPublicSymbolBySectOffset(uint32_t Sect,
                             uint32_t Offset)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:120

Parameters

uint32_t Sect
uint32_t Offset

std::unique_ptr<PDBSymbol> findSymbolBySectOffset(
    uint32_t Sect,
    uint32_t Offset,
    llvm::pdb::PDB_SymType Type)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:177

Parameters

uint32_t Sect
uint32_t Offset
llvm::pdb::PDB_SymType Type

llvm::pdb::SymIndexId findSymbolByTypeIndex(
    codeview::TypeIndex TI) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:154

Parameters

codeview::TypeIndex TI

template <typename ConcreteT>
ConcreteT& getNativeSymbolById(
    llvm::pdb::SymIndexId SymbolId) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:190

Templates

ConcreteT

Parameters

llvm::pdb::SymIndexId SymbolId

llvm::pdb::NativeRawSymbol& getNativeSymbolById(
    llvm::pdb::SymIndexId SymbolId) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:187

Parameters

llvm::pdb::SymIndexId SymbolId

uint32_t getNumCompilands() const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:183

std::unique_ptr<PDBSymbolCompiland>
getOrCreateCompiland(uint32_t Index)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:182

Parameters

uint32_t Index

template <typename ConcreteSymbolT,
          typename... Args>
llvm::pdb::SymIndexId getOrCreateFieldListMember(
    codeview::TypeIndex FieldListTI,
    uint32_t Index,
    Args&&... ConstructorArgs)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:157

Templates

ConcreteSymbolT
Args

Parameters

codeview::TypeIndex FieldListTI
uint32_t Index
Args&&... ConstructorArgs

llvm::pdb::SymIndexId
getOrCreateGlobalSymbolByOffset(uint32_t Offset)

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:171

Parameters

uint32_t Offset

llvm::pdb::SymIndexId getOrCreateInlineSymbol(
    codeview::InlineSiteSym Sym,
    uint64_t ParentAddr,
    uint16_t Modi,
    uint32_t RecordOffset) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:172

Parameters

codeview::InlineSiteSym Sym
uint64_t ParentAddr
uint16_t Modi
uint32_t RecordOffset

llvm::pdb::SymIndexId getOrCreateSourceFile(
    const codeview::FileChecksumEntry& Checksum)
    const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:196

Parameters

const codeview::FileChecksumEntry& Checksum

std::unique_ptr<IPDBSourceFile> getSourceFileById(
    llvm::pdb::SymIndexId FileId) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:194

Parameters

llvm::pdb::SymIndexId FileId

std::unique_ptr<PDBSymbol> getSymbolById(
    llvm::pdb::SymIndexId SymbolId) const

Declared at: llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h:185

Parameters

llvm::pdb::SymIndexId SymbolId