9 #ifndef LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLCACHE_H 10 #define LLVM_DEBUGINFO_PDB_NATIVE_SYMBOLCACHE_H 36 std::vector<std::unique_ptr<NativeRawSymbol>> Cache;
46 FieldListMembersToSymbolId;
50 std::vector<SymIndexId> Compilands;
57 Cache.push_back(
nullptr);
61 template <
typename ConcreteSymbolT,
typename CVRecordT,
typename...
Args>
63 Args &&... ConstructorArgs) {
66 codeview::TypeDeserializer::deserializeAs<CVRecordT>(CVT, Record)) {
71 return createSymbol<ConcreteSymbolT>(
72 TI, std::move(Record), std::forward<Args>(ConstructorArgs)...);
84 template <
typename ConcreteSymbolT,
typename...
Args>
90 auto Result = std::make_unique<ConcreteSymbolT>(
91 Session,
Id, std::forward<Args>(ConstructorArgs)...);
92 Result->SymbolId =
Id;
95 Cache.push_back(std::move(Result));
103 std::unique_ptr<IPDBEnumSymbols>
106 std::unique_ptr<IPDBEnumSymbols>
109 std::unique_ptr<IPDBEnumSymbols>
114 template <
typename ConcreteSymbolT,
typename...
Args>
117 Args &&... ConstructorArgs) {
119 std::pair<codeview::TypeIndex, uint32_t>
Key{FieldListTI, Index};
123 createSymbol<ConcreteSymbolT>(std::forward<Args>(ConstructorArgs)...);
125 SymId = Result.first->second;
138 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)