LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
lldb_private::ClangPersistentVariables Class Reference

#include <ClangPersistentVariables.h>

Inheritance diagram for lldb_private::ClangPersistentVariables:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::ClangPersistentVariables:
Collaboration graph
[legend]

Classes

struct  PersistentDecl
 

Public Member Functions

 ClangPersistentVariables (std::shared_ptr< Target > target_sp)
 
 ~ClangPersistentVariables () override=default
 
std::shared_ptr< ClangASTImporterGetClangASTImporter ()
 
std::shared_ptr< ClangModulesDeclVendorGetClangModulesDeclVendor ()
 
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. More...
 
std::string GetNextExprFileName ()
 Returns the next file name that should be used for user expressions. More...
 
llvm::Optional< CompilerTypeGetCompilerTypeFromPersistentDecl (ConstString type_name) override
 
void RegisterPersistentDecl (ConstString name, clang::NamedDecl *decl, TypeSystemClang *ctx)
 
clang::NamedDecl * GetPersistentDecl (ConstString name)
 
void AddHandLoadedClangModule (ClangModulesDeclVendor::ModuleID module)
 
const ClangModulesDeclVendor::ModuleVectorGetHandLoadedClangModules ()
 
- Public Member Functions inherited from lldb_private::PersistentExpressionState
LLVMCastKind getKind () const
 
 PersistentExpressionState (LLVMCastKind kind)
 
virtual ~PersistentExpressionState ()
 
virtual lldb::addr_t LookupSymbol (ConstString name)
 
void RegisterExecutionUnit (lldb::IRExecutionUnitSP &execution_unit_sp)
 
- Public Member Functions inherited from lldb_private::ExpressionVariableList
size_t GetSize ()
 Implementation of methods in ExpressionVariableListBase. More...
 
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. More...
 
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
 

Private Types

typedef llvm::DenseMap< const char *, PersistentDeclPersistentDeclMap
 

Private Attributes

uint32_t m_next_user_file_id = 0
 The counter used by GetNextExprFileName. More...
 
uint32_t m_next_persistent_variable_id = 0
 
PersistentDeclMap m_persistent_decls
 Persistent entities declared by the user. More...
 
ClangModulesDeclVendor::ModuleVector m_hand_loaded_clang_modules
 These are Clang modules we hand-loaded; these are the highest- priority source for macros. More...
 
std::shared_ptr< ClangASTImporterm_ast_importer_sp
 
std::shared_ptr< ClangModulesDeclVendorm_modules_decl_vendor_sp
 
std::shared_ptr< Targetm_target_sp
 

Additional Inherited Members

- Public Types inherited from lldb_private::PersistentExpressionState
enum  LLVMCastKind { eKindClang, eKindSwift, eKindGo, kNumKinds }
 

Detailed Description

"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 33 of file ClangPersistentVariables.h.

Member Typedef Documentation

◆ PersistentDeclMap

typedef llvm::DenseMap<const char *, PersistentDecl> lldb_private::ClangPersistentVariables::PersistentDeclMap
private

Definition at line 103 of file ClangPersistentVariables.h.

Constructor & Destructor Documentation

◆ ClangPersistentVariables()

ClangPersistentVariables::ClangPersistentVariables ( std::shared_ptr< Target target_sp)

Definition at line 27 of file ClangPersistentVariables.cpp.

◆ ~ClangPersistentVariables()

lldb_private::ClangPersistentVariables::~ClangPersistentVariables ( )
overridedefault

Member Function Documentation

◆ AddHandLoadedClangModule()

void lldb_private::ClangPersistentVariables::AddHandLoadedClangModule ( ClangModulesDeclVendor::ModuleID  module)
inline

◆ classof()

static bool lldb_private::ClangPersistentVariables::classof ( const PersistentExpressionState pv)
inlinestatic

◆ CreatePersistentVariable() [1/2]

ExpressionVariableSP ClangPersistentVariables::CreatePersistentVariable ( const lldb::ValueObjectSP &  valobj_sp)
overridevirtual

◆ CreatePersistentVariable() [2/2]

ExpressionVariableSP ClangPersistentVariables::CreatePersistentVariable ( ExecutionContextScope exe_scope,
ConstString  name,
const CompilerType compiler_type,
lldb::ByteOrder  byte_order,
uint32_t  addr_byte_size 
)
overridevirtual

◆ GetClangASTImporter()

std::shared_ptr< ClangASTImporter > ClangPersistentVariables::GetClangASTImporter ( )

Definition at line 108 of file ClangPersistentVariables.cpp.

References m_ast_importer_sp.

◆ GetClangModulesDeclVendor()

std::shared_ptr< ClangModulesDeclVendor > ClangPersistentVariables::GetClangModulesDeclVendor ( )

◆ GetCompilerTypeFromPersistentDecl()

llvm::Optional< CompilerType > ClangPersistentVariables::GetCompilerTypeFromPersistentDecl ( ConstString  type_name)
overridevirtual

◆ GetHandLoadedClangModules()

const ClangModulesDeclVendor::ModuleVector& lldb_private::ClangPersistentVariables::GetHandLoadedClangModules ( )
inline

Definition at line 80 of file ClangPersistentVariables.h.

References m_hand_loaded_clang_modules.

◆ GetNextExprFileName()

std::string lldb_private::ClangPersistentVariables::GetNextExprFileName ( )
inline

Returns the next file name that should be used for user expressions.

Definition at line 60 of file ClangPersistentVariables.h.

References m_next_user_file_id, and string().

Referenced by lldb_private::ClangUserExpression::PrepareForParsing().

◆ GetNextPersistentVariableName()

ConstString ClangPersistentVariables::GetNextPersistentVariableName ( bool  is_error = false)
overridevirtual

Return a new persistent variable name with the specified prefix.

Implements lldb_private::PersistentExpressionState.

Definition at line 125 of file ClangPersistentVariables.cpp.

References GetPersistentVariablePrefix(), and m_next_persistent_variable_id.

◆ GetPersistentDecl()

clang::NamedDecl * ClangPersistentVariables::GetPersistentDecl ( ConstString  name)

◆ GetPersistentVariablePrefix()

llvm::StringRef lldb_private::ClangPersistentVariables::GetPersistentVariablePrefix ( bool  is_error = false) const
inlineoverrideprotectedvirtual

◆ RegisterPersistentDecl()

void ClangPersistentVariables::RegisterPersistentDecl ( ConstString  name,
clang::NamedDecl *  decl,
TypeSystemClang ctx 
)

◆ RemovePersistentVariable()

void ClangPersistentVariables::RemovePersistentVariable ( lldb::ExpressionVariableSP  variable)
overridevirtual

Member Data Documentation

◆ m_ast_importer_sp

std::shared_ptr<ClangASTImporter> lldb_private::ClangPersistentVariables::m_ast_importer_sp
private

Definition at line 111 of file ClangPersistentVariables.h.

Referenced by GetClangASTImporter().

◆ m_hand_loaded_clang_modules

ClangModulesDeclVendor::ModuleVector lldb_private::ClangPersistentVariables::m_hand_loaded_clang_modules
private

These are Clang modules we hand-loaded; these are the highest- priority source for macros.

Definition at line 108 of file ClangPersistentVariables.h.

Referenced by AddHandLoadedClangModule(), and GetHandLoadedClangModules().

◆ m_modules_decl_vendor_sp

std::shared_ptr<ClangModulesDeclVendor> lldb_private::ClangPersistentVariables::m_modules_decl_vendor_sp
private

Definition at line 112 of file ClangPersistentVariables.h.

Referenced by GetClangModulesDeclVendor().

◆ m_next_persistent_variable_id

uint32_t lldb_private::ClangPersistentVariables::m_next_persistent_variable_id = 0
private

◆ m_next_user_file_id

uint32_t lldb_private::ClangPersistentVariables::m_next_user_file_id = 0
private

The counter used by GetNextExprFileName.

Definition at line 92 of file ClangPersistentVariables.h.

Referenced by GetNextExprFileName().

◆ m_persistent_decls

PersistentDeclMap lldb_private::ClangPersistentVariables::m_persistent_decls
private

Persistent entities declared by the user.

Definition at line 105 of file ClangPersistentVariables.h.

Referenced by GetCompilerTypeFromPersistentDecl(), GetPersistentDecl(), and RegisterPersistentDecl().

◆ m_target_sp

std::shared_ptr<Target> lldb_private::ClangPersistentVariables::m_target_sp
private

Definition at line 113 of file ClangPersistentVariables.h.

Referenced by GetClangModulesDeclVendor().


The documentation for this class was generated from the following files: