Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLCACHE_H
10 #define LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLCACHE_H
28 struct FileChecksumEntry;
34 class PDBSymbolCompiland;
46 mutable std::vector<std::unique_ptr<NativeRawSymbol>> Cache;
56 FieldListMembersToSymbolId;
60 mutable std::vector<SymIndexId> Compilands;
63 mutable std::vector<std::unique_ptr<NativeSourceFile>> SourceFiles;
79 SymTabOffsetToSymbolId;
81 struct LineTableEntry {
89 std::vector<LineTableEntry> findLineTable(
uint16_t Modi)
const;
94 Cache.push_back(
nullptr);
98 template <
typename ConcreteSymbolT,
typename CVRecordT,
typename...
Args>
100 Args &&...ConstructorArgs)
const {
103 codeview::TypeDeserializer::deserializeAs<CVRecordT>(CVT,
Record)) {
108 return createSymbol<ConcreteSymbolT>(
118 std::unique_ptr<PDBSymbol> findFunctionSymbolBySectOffset(
uint32_t Sect,
120 std::unique_ptr<PDBSymbol> findPublicSymbolBySectOffset(
uint32_t Sect,
126 template <
typename ConcreteSymbolT,
typename...
Args>
132 auto Result = std::make_unique<ConcreteSymbolT>(
133 Session,
Id, std::forward<Args>(ConstructorArgs)...);
134 Result->SymbolId =
Id;
145 std::unique_ptr<IPDBEnumSymbols>
148 std::unique_ptr<IPDBEnumSymbols>
151 std::unique_ptr<IPDBEnumSymbols>
156 template <
typename ConcreteSymbolT,
typename...
Args>
159 Args &&... ConstructorArgs) {
161 std::pair<codeview::TypeIndex, uint32_t>
Key{FieldListTI,
Index};
165 createSymbol<ConcreteSymbolT>(std::forward<Args>(ConstructorArgs)...);
167 SymId = Result.first->second;
176 std::unique_ptr<PDBSymbol>
179 std::unique_ptr<IPDBEnumLineNumbers>
189 template <
typename ConcreteT>
std::unique_ptr< IPDBEnumSymbols > createTypeEnumerator(codeview::TypeLeafKind Kind)
This is an optimization pass for GlobalISel generic memory operations.
ModifierOptions
Equivalent to CV_modifier_t.
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
SymIndexId getOrCreateInlineSymbol(codeview::InlineSiteSym Sym, uint64_t ParentAddr, uint16_t Modi, uint32_t RecordOffset) const
std::unique_ptr< IPDBSourceFile > getSourceFileById(SymIndexId FileId) const
The instances of the Type class are immutable: once they are created, they are never changed.
SymIndexId createSymbol(Args &&...ConstructorArgs) const
SymIndexId getOrCreateFieldListMember(codeview::TypeIndex FieldListTI, uint32_t Index, Args &&... ConstructorArgs)
void consumeError(Error Err)
Consume a Error without doing anything.
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
ConcreteT & getNativeSymbolById(SymIndexId SymbolId) const
std::unique_ptr< PDBSymbol > getSymbolById(SymIndexId SymbolId) const
std::unique_ptr< PDBSymbol > findSymbolBySectOffset(uint32_t Sect, uint32_t Offset, PDB_SymType Type)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
uint32_t getNumCompilands() const
SymIndexId findSymbolByTypeIndex(codeview::TypeIndex TI) const
std::unique_ptr< PDBSymbolCompiland > getOrCreateCompiland(uint32_t Index)
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&... Args)
SymIndexId getOrCreateGlobalSymbolByOffset(uint32_t Offset)
NativeRawSymbol & getNativeSymbolById(SymIndexId SymbolId) const
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
SymIndexId getOrCreateSourceFile(const codeview::FileChecksumEntry &Checksum) const
SymbolCache(NativeSession &Session, DbiStream *Dbi)
std::unique_ptr< IPDBEnumLineNumbers > findLineNumbersByVA(uint64_t VA, uint32_t Length) const
std::unique_ptr< IPDBEnumSymbols > createGlobalsEnumerator(codeview::SymbolKind Kind)