Differential D79752 Diff 266389 lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
Show All 13 Lines | |||||
#include "ClangExpressionVariable.h" | #include "ClangExpressionVariable.h" | ||||
#include "ClangModulesDeclVendor.h" | #include "ClangModulesDeclVendor.h" | ||||
#include "lldb/Expression/ExpressionVariable.h" | #include "lldb/Expression/ExpressionVariable.h" | ||||
namespace lldb_private { | namespace lldb_private { | ||||
class ClangASTImporter; | class ClangASTImporter; | ||||
class ClangModulesDeclVendor; | |||||
class Target; | |||||
class TypeSystemClang; | class TypeSystemClang; | ||||
/// \class ClangPersistentVariables ClangPersistentVariables.h | /// \class ClangPersistentVariables ClangPersistentVariables.h | ||||
/// "lldb/Expression/ClangPersistentVariables.h" Manages persistent values | /// "lldb/Expression/ClangPersistentVariables.h" Manages persistent values | ||||
/// that need to be preserved between expression invocations. | /// that need to be preserved between expression invocations. | ||||
/// | /// | ||||
/// A list of variables that can be accessed and updated by any expression. See | /// A list of variables that can be accessed and updated by any expression. See | ||||
/// ClangPersistentVariable for more discussion. Also provides an increasing, | /// ClangPersistentVariable for more discussion. Also provides an increasing, | ||||
/// 0-based counter for naming result variables. | /// 0-based counter for naming result variables. | ||||
class ClangPersistentVariables : public PersistentExpressionState { | class ClangPersistentVariables : public PersistentExpressionState { | ||||
public: | public: | ||||
ClangPersistentVariables(); | ClangPersistentVariables(std::shared_ptr<Target> target); | ||||
~ClangPersistentVariables() override = default; | ~ClangPersistentVariables() override = default; | ||||
// llvm casting support | // llvm casting support | ||||
static bool classof(const PersistentExpressionState *pv) { | static bool classof(const PersistentExpressionState *pv) { | ||||
return pv->getKind() == PersistentExpressionState::eKindClang; | return pv->getKind() == PersistentExpressionState::eKindClang; | ||||
} | } | ||||
std::shared_ptr<ClangASTImporter> GetClangASTImporter(); | std::shared_ptr<ClangASTImporter> GetClangASTImporter(); | ||||
std::shared_ptr<ClangModulesDeclVendor> GetClangModulesDeclVendor(); | |||||
lldb::ExpressionVariableSP | lldb::ExpressionVariableSP | ||||
CreatePersistentVariable(const lldb::ValueObjectSP &valobj_sp) override; | CreatePersistentVariable(const lldb::ValueObjectSP &valobj_sp) override; | ||||
lldb::ExpressionVariableSP CreatePersistentVariable( | lldb::ExpressionVariableSP CreatePersistentVariable( | ||||
ExecutionContextScope *exe_scope, ConstString name, | ExecutionContextScope *exe_scope, ConstString name, | ||||
const CompilerType &compiler_type, lldb::ByteOrder byte_order, | const CompilerType &compiler_type, lldb::ByteOrder byte_order, | ||||
uint32_t addr_byte_size) override; | uint32_t addr_byte_size) override; | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | private: | ||||
PersistentDeclMap | PersistentDeclMap | ||||
m_persistent_decls; ///< Persistent entities declared by the user. | m_persistent_decls; ///< Persistent entities declared by the user. | ||||
ClangModulesDeclVendor::ModuleVector | ClangModulesDeclVendor::ModuleVector | ||||
m_hand_loaded_clang_modules; ///< These are Clang modules we hand-loaded; | m_hand_loaded_clang_modules; ///< These are Clang modules we hand-loaded; | ||||
///these are the highest- | ///these are the highest- | ||||
///< priority source for macros. | ///< priority source for macros. | ||||
std::shared_ptr<ClangASTImporter> m_ast_importer_sp; | std::shared_ptr<ClangASTImporter> m_ast_importer_sp; | ||||
std::shared_ptr<ClangModulesDeclVendor> m_modules_decl_vendor_sp; | |||||
std::shared_ptr<Target> m_target_sp; | |||||
}; | }; | ||||
} // namespace lldb_private | } // namespace lldb_private | ||||
#endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGPERSISTENTVARIABLES_H | #endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGPERSISTENTVARIABLES_H |