10 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLCACHE_H 11 #define LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLCACHE_H 37 std::vector<std::unique_ptr<NativeRawSymbol>> Cache;
47 FieldListMembersToSymbolId;
51 std::vector<SymIndexId> Compilands;
58 Cache.push_back(
nullptr);
62 template <
typename ConcreteSymbolT,
typename CVRecordT,
typename...
Args>
64 Args &&... ConstructorArgs) {
67 codeview::TypeDeserializer::deserializeAs<CVRecordT>(CVT, Record)) {
72 return createSymbol<ConcreteSymbolT>(
73 TI, std::move(Record), std::forward<Args>(ConstructorArgs)...);
85 template <
typename ConcreteSymbolT,
typename...
Args>
91 auto Result = llvm::make_unique<ConcreteSymbolT>(
92 Session,
Id, std::forward<Args>(ConstructorArgs)...);
93 Result->SymbolId =
Id;
96 Cache.push_back(std::move(Result));
104 std::unique_ptr<IPDBEnumSymbols>
107 std::unique_ptr<IPDBEnumSymbols>
110 std::unique_ptr<IPDBEnumSymbols>
115 template <
typename ConcreteSymbolT,
typename...
Args>
118 Args &&... ConstructorArgs) {
120 std::pair<codeview::TypeIndex, uint32_t>
Key{FieldListTI, Index};
124 createSymbol<ConcreteSymbolT>(std::forward<Args>(ConstructorArgs)...);
126 SymId = Result.first->second;
139 template <
typename ConcreteT>
std::unique_ptr< IPDBEnumSymbols > createGlobalsEnumerator(codeview::SymbolKind Kind)
This class represents lattice values for constants.
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
std::unique_ptr< IPDBEnumSymbols > createTypeEnumerator(codeview::TypeLeafKind Kind)
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
std::unique_ptr< PDBSymbol > getSymbolById(SymIndexId SymbolId) const
std::unique_ptr< PDBSymbolCompiland > getOrCreateCompiland(uint32_t Index)
SymbolCache(NativeSession &Session, DbiStream *Dbi)
ModifierOptions
Equivalent to CV_modifier_t.
void consumeError(Error Err)
Consume a Error without doing anything.
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&... Args)
SymIndexId getOrCreateGlobalSymbolByOffset(uint32_t Offset)
SymIndexId createSymbol(Args &&... ConstructorArgs)
NativeRawSymbol & getNativeSymbolById(SymIndexId SymbolId) const
ConcreteT & getNativeSymbolById(SymIndexId SymbolId) const
SymIndexId findSymbolByTypeIndex(codeview::TypeIndex TI)
uint32_t getNumCompilands() const
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
SymIndexId getOrCreateFieldListMember(codeview::TypeIndex FieldListTI, uint32_t Index, Args &&... ConstructorArgs)