LLDB mainline
|
"lldb/Expression/ClangPersistentVariables.h" Manages persistent values that need to be preserved between expression invocations. More...
#include <ClangPersistentVariables.h>
Classes | |
struct | PersistentDecl |
Public Member Functions | |
ClangPersistentVariables (std::shared_ptr< Target > target_sp) | |
~ClangPersistentVariables () override=default | |
std::shared_ptr< ClangASTImporter > | GetClangASTImporter () |
std::shared_ptr< ClangModulesDeclVendor > | GetClangModulesDeclVendor () |
lldb::ExpressionVariableSP | CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp) override |
lldb::ExpressionVariableSP | CreatePersistentVariable (ExecutionContextScope *exe_scope, ConstString name, const CompilerType &compiler_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size) override |
void | RemovePersistentVariable (lldb::ExpressionVariableSP variable) override |
ConstString | GetNextPersistentVariableName (bool is_error=false) override |
Return a new persistent variable name with the specified prefix. | |
std::string | GetNextExprFileName () |
Returns the next file name that should be used for user expressions. | |
std::optional< CompilerType > | GetCompilerTypeFromPersistentDecl (ConstString type_name) override |
void | RegisterPersistentDecl (ConstString name, clang::NamedDecl *decl, std::shared_ptr< TypeSystemClang > ctx) |
clang::NamedDecl * | GetPersistentDecl (ConstString name) |
void | AddHandLoadedClangModule (ClangModulesDeclVendor::ModuleID module) |
const ClangModulesDeclVendor::ModuleVector & | GetHandLoadedClangModules () |
![]() | |
LLVMCastKind | getKind () const |
PersistentExpressionState (LLVMCastKind kind) | |
virtual | ~PersistentExpressionState () |
virtual lldb::ExpressionVariableSP | CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp)=0 |
virtual lldb::ExpressionVariableSP | CreatePersistentVariable (ExecutionContextScope *exe_scope, ConstString name, const CompilerType &type, lldb::ByteOrder byte_order, uint32_t addr_byte_size)=0 |
virtual ConstString | GetNextPersistentVariableName (bool is_error=false)=0 |
Return a new persistent variable name with the specified prefix. | |
virtual void | RemovePersistentVariable (lldb::ExpressionVariableSP variable)=0 |
virtual std::optional< CompilerType > | GetCompilerTypeFromPersistentDecl (ConstString type_name)=0 |
virtual lldb::addr_t | LookupSymbol (ConstString name) |
void | RegisterExecutionUnit (lldb::IRExecutionUnitSP &execution_unit_sp) |
![]() | |
size_t | GetSize () |
Implementation of methods in ExpressionVariableListBase. | |
lldb::ExpressionVariableSP | GetVariableAtIndex (size_t index) |
size_t | AddVariable (const lldb::ExpressionVariableSP &var_sp) |
lldb::ExpressionVariableSP | AddNewlyConstructedVariable (ExpressionVariable *var) |
bool | ContainsVariable (const lldb::ExpressionVariableSP &var_sp) |
lldb::ExpressionVariableSP | GetVariable (ConstString name) |
Finds a variable by name in the list. | |
lldb::ExpressionVariableSP | GetVariable (llvm::StringRef name) |
void | RemoveVariable (lldb::ExpressionVariableSP var_sp) |
void | Clear () |
Static Public Member Functions | |
static bool | classof (const PersistentExpressionState *pv) |
Protected Member Functions | |
llvm::StringRef | GetPersistentVariablePrefix (bool is_error=false) const override |
virtual llvm::StringRef | GetPersistentVariablePrefix (bool is_error=false) const =0 |
Private Types | |
typedef llvm::DenseMap< const char *, PersistentDecl > | PersistentDeclMap |
Private Attributes | |
uint32_t | m_next_user_file_id = 0 |
The counter used by GetNextExprFileName. | |
uint32_t | m_next_persistent_variable_id = 0 |
PersistentDeclMap | m_persistent_decls |
Persistent entities declared by the user. | |
ClangModulesDeclVendor::ModuleVector | m_hand_loaded_clang_modules |
These are Clang modules we hand-loaded; these are the highest- priority source for macros. | |
std::shared_ptr< ClangASTImporter > | m_ast_importer_sp |
std::shared_ptr< ClangModulesDeclVendor > | m_modules_decl_vendor_sp |
std::shared_ptr< Target > | m_target_sp |
Additional Inherited Members | |
![]() | |
enum | LLVMCastKind { eKindClang , eKindSwift , eKindGo , kNumKinds } |
"lldb/Expression/ClangPersistentVariables.h" Manages persistent values that need to be preserved between expression invocations.
A list of variables that can be accessed and updated by any expression. See ClangPersistentVariable for more discussion. Also provides an increasing, 0-based counter for naming result variables.
Definition at line 34 of file ClangPersistentVariables.h.
|
private |
Definition at line 104 of file ClangPersistentVariables.h.
ClangPersistentVariables::ClangPersistentVariables | ( | std::shared_ptr< Target > | target_sp | ) |
Definition at line 29 of file ClangPersistentVariables.cpp.
|
overridedefault |
|
inline |
Definition at line 77 of file ClangPersistentVariables.h.
References m_hand_loaded_clang_modules.
Referenced by lldb_private::ClangExpressionParser::LLDBPreprocessorCallbacks::moduleImport().
|
inlinestatic |
Definition at line 41 of file ClangPersistentVariables.h.
References lldb_private::PersistentExpressionState::eKindClang, and lldb_private::PersistentExpressionState::getKind().
|
overridevirtual |
Implements lldb_private::PersistentExpressionState.
Definition at line 34 of file ClangPersistentVariables.cpp.
References lldb_private::ExpressionVariableList::AddNewlyConstructedVariable().
|
overridevirtual |
Implements lldb_private::PersistentExpressionState.
Definition at line 39 of file ClangPersistentVariables.cpp.
References lldb_private::ExpressionVariableList::AddNewlyConstructedVariable().
std::shared_ptr< ClangASTImporter > ClangPersistentVariables::GetClangASTImporter | ( | ) |
Definition at line 110 of file ClangPersistentVariables.cpp.
References m_ast_importer_sp.
std::shared_ptr< ClangModulesDeclVendor > ClangPersistentVariables::GetClangModulesDeclVendor | ( | ) |
Definition at line 118 of file ClangPersistentVariables.cpp.
References lldb_private::ClangModulesDeclVendor::Create(), m_modules_decl_vendor_sp, and m_target_sp.
|
overridevirtual |
Implements lldb_private::PersistentExpressionState.
Definition at line 74 of file ClangPersistentVariables.cpp.
References lldb_private::ConstString::GetCString(), lldb_private::ClangPersistentVariables::PersistentDecl::m_context, lldb_private::ClangPersistentVariables::PersistentDecl::m_decl, and m_persistent_decls.
|
inline |
Definition at line 81 of file ClangPersistentVariables.h.
References m_hand_loaded_clang_modules.
|
inline |
Returns the next file name that should be used for user expressions.
Definition at line 61 of file ClangPersistentVariables.h.
References m_next_user_file_id.
Referenced by lldb_private::ClangUserExpression::PrepareForParsing().
|
overridevirtual |
Return a new persistent variable name with the specified prefix.
Implements lldb_private::PersistentExpressionState.
Definition at line 127 of file ClangPersistentVariables.cpp.
References GetPersistentVariablePrefix(), and m_next_persistent_variable_id.
clang::NamedDecl * ClangPersistentVariables::GetPersistentDecl | ( | ConstString | name | ) |
Definition at line 105 of file ClangPersistentVariables.cpp.
References lldb_private::ConstString::GetCString(), and m_persistent_decls.
|
inlineoverrideprotectedvirtual |
Implements lldb_private::PersistentExpressionState.
Definition at line 87 of file ClangPersistentVariables.h.
Referenced by GetNextPersistentVariableName(), and RemovePersistentVariable().
void ClangPersistentVariables::RegisterPersistentDecl | ( | ConstString | name, |
clang::NamedDecl * | decl, | ||
std::shared_ptr< TypeSystemClang > | ctx | ||
) |
Definition at line 89 of file ClangPersistentVariables.cpp.
References lldb_private::ConstString::GetCString(), and m_persistent_decls.
|
overridevirtual |
Implements lldb_private::PersistentExpressionState.
Definition at line 47 of file ClangPersistentVariables.cpp.
References GetPersistentVariablePrefix(), m_next_persistent_variable_id, and lldb_private::ExpressionVariableList::RemoveVariable().
|
private |
Definition at line 112 of file ClangPersistentVariables.h.
Referenced by GetClangASTImporter().
|
private |
These are Clang modules we hand-loaded; these are the highest- priority source for macros.
Definition at line 109 of file ClangPersistentVariables.h.
Referenced by AddHandLoadedClangModule(), and GetHandLoadedClangModules().
|
private |
Definition at line 113 of file ClangPersistentVariables.h.
Referenced by GetClangModulesDeclVendor().
|
private |
Definition at line 95 of file ClangPersistentVariables.h.
Referenced by GetNextPersistentVariableName(), and RemovePersistentVariable().
|
private |
The counter used by GetNextExprFileName.
Definition at line 93 of file ClangPersistentVariables.h.
Referenced by GetNextExprFileName().
|
private |
Persistent entities declared by the user.
Definition at line 106 of file ClangPersistentVariables.h.
Referenced by GetCompilerTypeFromPersistentDecl(), GetPersistentDecl(), and RegisterPersistentDecl().
|
private |
Definition at line 114 of file ClangPersistentVariables.h.
Referenced by GetClangModulesDeclVendor().