diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2020-01-17 20:45:01 +0000 |
| commit | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (patch) | |
| tree | 4adf86a776049cbf7f69a1929c4babcbbef925eb /lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h | |
| parent | 7cc9cf2bf09f069cb2dd947ead05d0b54301fb71 (diff) | |
Notes
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h index 95e6c3ac963de..434196b35fd52 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h @@ -62,7 +62,8 @@ public: llvm::Optional<CompilerType> GetCompilerTypeFromPersistentDecl(ConstString type_name) override; - void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl); + void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl, + ClangASTContext *ctx); clang::NamedDecl *GetPersistentDecl(ConstString name); @@ -80,7 +81,14 @@ private: // The counter used by GetNextPersistentVariableName uint32_t m_next_persistent_variable_id = 0; - typedef llvm::DenseMap<const char *, clang::NamedDecl *> PersistentDeclMap; + struct PersistentDecl { + /// The persistent decl. + clang::NamedDecl *m_decl = nullptr; + /// The ClangASTContext for the ASTContext of m_decl. + ClangASTContext *m_context = nullptr; + }; + + typedef llvm::DenseMap<const char *, PersistentDecl> PersistentDeclMap; PersistentDeclMap m_persistent_decls; ///< Persistent entities declared by the user. |
