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

"lldb/Expression/ClangUserExpression.h" Encapsulates a single expression for use with Clang More...

#include <ClangUserExpression.h>

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

Classes

class  ClangUserExpressionHelper
 
class  ResultDelegate
 

Public Types

enum  { kDefaultTimeout = 500000u }
 
- Public Types inherited from lldb_private::UserExpression
enum  { kDefaultTimeout = 500000u }
 
- Public Types inherited from lldb_private::Expression
enum  ResultType { eResultTypeAny, eResultTypeId }
 

Public Member Functions

bool isA (const void *ClassID) const override
 
 ClangUserExpression (ExecutionContextScope &exe_scope, llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, ResultType desired_type, const EvaluateExpressionOptions &options, ValueObject *ctx_obj)
 Constructor. More...
 
 ~ClangUserExpression () override
 
bool Parse (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, lldb_private::ExecutionPolicy execution_policy, bool keep_result_in_memory, bool generate_debug_info) override
 Parse the expression. More...
 
bool Complete (ExecutionContext &exe_ctx, CompletionRequest &request, unsigned complete_pos) override
 Attempts to find possible command line completions for the given (possible incomplete) user expression. More...
 
ExpressionTypeSystemHelperGetTypeSystemHelper () override
 
ClangExpressionDeclMapDeclMap ()
 
void ResetDeclMap ()
 
void ResetDeclMap (ExecutionContext &exe_ctx, Materializer::PersistentVariableDelegate &result_delegate, bool keep_result_in_memory)
 
lldb::ExpressionVariableSP GetResultAfterDematerialization (ExecutionContextScope *exe_scope) override
 
bool DidImportCxxModules () const
 
- Public Member Functions inherited from lldb_private::LLVMUserExpression
 LLVMUserExpression (ExecutionContextScope &exe_scope, llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, ResultType desired_type, const EvaluateExpressionOptions &options)
 
 ~LLVMUserExpression () override
 
bool FinalizeJITExecution (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, lldb::ExpressionVariableSP &result, lldb::addr_t function_stack_bottom=LLDB_INVALID_ADDRESS, lldb::addr_t function_stack_top=LLDB_INVALID_ADDRESS) override
 Apply the side effects of the function to program state. More...
 
bool CanInterpret () override
 
MaterializerGetMaterializer () override
 Return the Materializer that the parser should use when registering external values. More...
 
const char * Text () override
 Return the string that the parser should parse. More...
 
- Public Member Functions inherited from lldb_private::UserExpression
 UserExpression (ExecutionContextScope &exe_scope, llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language, ResultType desired_type, const EvaluateExpressionOptions &options)
 Constructor. More...
 
 ~UserExpression () override
 Destructor. More...
 
bool MatchesContext (ExecutionContext &exe_ctx)
 
lldb::ExpressionResults Execute (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options, lldb::UserExpressionSP &shared_ptr_to_me, lldb::ExpressionVariableSP &result)
 Execute the parsed expression by callinng the derived class's DoExecute method. More...
 
const char * Text () override
 Return the string that the parser should parse. More...
 
const char * GetUserText ()
 Return the string that the user typed. More...
 
const char * FunctionName () override
 Return the function name that should be used for executing the expression. More...
 
lldb::LanguageType Language () const override
 Return the language that should be used when parsing. More...
 
ResultType DesiredResultType () override
 Return the desired result type of the function, or eResultTypeAny if indifferent. More...
 
bool NeedsValidation () override
 Return true if validation code should be inserted into the expression. More...
 
bool NeedsVariableResolution () override
 Return true if external variables in the expression should be resolved. More...
 
EvaluateExpressionOptionsGetOptions () override
 
const char * GetFixedText ()
 
- Public Member Functions inherited from lldb_private::Expression
 Expression (Target &target)
 
 Expression (ExecutionContextScope &exe_scope)
 
virtual ~Expression ()
 Destructor. More...
 
lldb::addr_t StartAddress ()
 Return the address of the function's JIT-compiled code, or LLDB_INVALID_ADDRESS if the function is not JIT compiled. More...
 
virtual void WillStartExecuting ()
 Called to notify the expression that it is about to be executed. More...
 
virtual void DidFinishExecuting ()
 Called to notify the expression that its execution has finished. More...
 

Static Public Member Functions

static bool classof (const Expression *obj)
 
- Static Public Member Functions inherited from lldb_private::LLVMUserExpression
static bool classof (const Expression *obj)
 
- Static Public Member Functions inherited from lldb_private::UserExpression
static bool classof (const Expression *obj)
 
static lldb::ExpressionResults Evaluate (ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options, llvm::StringRef expr_cstr, llvm::StringRef expr_prefix, lldb::ValueObjectSP &result_valobj_sp, Status &error, std::string *fixed_expression=nullptr, ValueObject *ctx_obj=nullptr)
 Evaluate one expression in the scratch context of the target passed in the exe_ctx and return its result. More...
 

Private Member Functions

void ScanContext (ExecutionContext &exe_ctx, lldb_private::Status &err) override
 Populate m_in_cplusplus_method and m_in_objectivec_method based on the environment. More...
 
bool AddArguments (ExecutionContext &exe_ctx, std::vector< lldb::addr_t > &args, lldb::addr_t struct_address, DiagnosticManager &diagnostic_manager) override
 
void CreateSourceCode (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, std::vector< std::string > modules_to_import, bool for_completion)
 
ClangExpressionSourceCode::WrapKind GetWrapKind () const
 Defines how the current expression should be wrapped. More...
 
bool SetupPersistentState (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx)
 
bool PrepareForParsing (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, bool for_completion)
 

Private Attributes

ClangUserExpressionHelper m_type_system_helper
 
std::vector< std::string > m_include_directories
 The include directories that should be used when parsing the expression. More...
 
llvm::Optional< size_t > m_user_expression_start_pos
 The absolute character position in the transformed source code where the user code (as typed by the user) starts. More...
 
ResultDelegate m_result_delegate
 
ClangPersistentVariablesm_clang_state
 
std::unique_ptr< ClangExpressionSourceCodem_source_code
 
std::string m_filename
 File name used for the expression. More...
 
ValueObjectm_ctx_obj
 The object (if any) in which context the expression is evaluated. More...
 
bool m_imported_cpp_modules = false
 True iff this expression explicitly imported C++ modules. More...
 
bool m_enforce_valid_object = true
 True if the expression parser should enforce the presence of a valid class pointer in order to generate the expression as a method. More...
 
bool m_in_cplusplus_method = false
 True if the expression is compiled as a C++ member function (true if it was parsed when exe_ctx was in a C++ method). More...
 
bool m_in_objectivec_method = false
 True if the expression is compiled as an Objective-C method (true if it was parsed when exe_ctx was in an Objective-C method). More...
 
bool m_in_static_method = false
 True if the expression is compiled as a static (or class) method (currently true if it was parsed when exe_ctx was in an Objective-C class method). More...
 
bool m_needs_object_ptr = false
 True if "this" or "self" must be looked up and passed in. More...
 

Static Private Attributes

static char ID
 

Additional Inherited Members

- Static Public Attributes inherited from lldb_private::UserExpression
static const Status::ValueType kNoResult
 ValueObject::GetError() returns this if there is no result from the expression. More...
 
- Protected Member Functions inherited from lldb_private::LLVMUserExpression
lldb::ExpressionResults DoExecute (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options, lldb::UserExpressionSP &shared_ptr_to_me, lldb::ExpressionVariableSP &result) override
 
bool PrepareToExecuteJITExpression (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, lldb::addr_t &struct_address)
 
- Protected Member Functions inherited from lldb_private::UserExpression
void InstallContext (ExecutionContext &exe_ctx)
 Populate m_in_cplusplus_method and m_in_objectivec_method based on the environment. More...
 
bool LockAndCheckContext (ExecutionContext &exe_ctx, lldb::TargetSP &target_sp, lldb::ProcessSP &process_sp, lldb::StackFrameSP &frame_sp)
 
- Static Protected Member Functions inherited from lldb_private::UserExpression
static lldb::addr_t GetObjectPointer (lldb::StackFrameSP frame_sp, ConstString &object_name, Status &err)
 
- Protected Attributes inherited from lldb_private::LLVMUserExpression
lldb::addr_t m_stack_frame_bottom
 The bottom of the allocated stack frame. More...
 
lldb::addr_t m_stack_frame_top
 The top of the allocated stack frame. More...
 
bool m_allow_cxx
 True if the language allows C++. More...
 
bool m_allow_objc
 True if the language allows Objective-C. More...
 
std::string m_transformed_text
 The text of the expression, as send to the parser. More...
 
std::shared_ptr< IRExecutionUnitm_execution_unit_sp
 The execution unit the expression is stored in. More...
 
std::unique_ptr< Materializerm_materializer_up
 The materializer to use when running the expression. More...
 
lldb::ModuleWP m_jit_module_wp
 
Targetm_target
 The target for storing persistent data like types and variables. More...
 
bool m_can_interpret
 True if the expression could be evaluated statically; false otherwise. More...
 
lldb::addr_t m_materialized_address
 The address at which the arguments to the expression have been materialized. More...
 
Materializer::DematerializerSP m_dematerializer_sp
 The dematerializer. More...
 
- Protected Attributes inherited from lldb_private::UserExpression
Address m_address
 The address the process is stopped in. More...
 
std::string m_expr_text
 The text of the expression, as typed by the user. More...
 
std::string m_expr_prefix
 The text of the translation-level definitions, as provided by the user. More...
 
std::string m_fixed_text
 The text of the expression with fix-its applied. More...
 
lldb::LanguageType m_language
 The language to use when parsing (eLanguageTypeUnknown means use defaults) More...
 
ResultType m_desired_type
 The type to coerce the expression's result to. More...
 
EvaluateExpressionOptions m_options
 Additional options provided by the user. More...
 
- Protected Attributes inherited from lldb_private::Expression
lldb::TargetWP m_target_wp
 
lldb::ProcessWP m_jit_process_wp
 Expression's always have to have a target... More...
 
lldb::addr_t m_jit_start_addr
 An expression might have a process, but it doesn't need to (e.g. More...
 
lldb::addr_t m_jit_end_addr
 The address of the JITted function within the JIT allocation. More...
 

Detailed Description

"lldb/Expression/ClangUserExpression.h" Encapsulates a single expression for use with Clang

LLDB uses expressions for various purposes, notably to call functions and as a backend for the expr command. ClangUserExpression encapsulates the objects needed to parse and interpret or JIT an expression. It uses the Clang parser to produce LLVM IR from the expression.

Definition at line 39 of file ClangUserExpression.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kDefaultTimeout 

Definition at line 49 of file ClangUserExpression.h.

Constructor & Destructor Documentation

◆ ClangUserExpression()

ClangUserExpression::ClangUserExpression ( ExecutionContextScope exe_scope,
llvm::StringRef  expr,
llvm::StringRef  prefix,
lldb::LanguageType  language,
ResultType  desired_type,
const EvaluateExpressionOptions options,
ValueObject ctx_obj 
)

Constructor.

Parameters
[in]exprThe expression to parse.
[in]prefixIf non-NULL, a C string containing translation-unit level definitions to be included when the expression is parsed.
[in]languageIf not eLanguageTypeUnknown, a language to use when parsing the expression. Currently restricted to those languages supported by Clang.
[in]desired_typeIf not eResultTypeAny, the type to use for the expression result.
[in]optionsAdditional options for the expression.
[in]ctx_objThe object (if any) in which context the expression must be evaluated. For details see the comment to UserExpression::Evaluate.

Definition at line 68 of file ClangUserExpression.cpp.

References lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeObjC, lldb::eLanguageTypeObjC_plus_plus, lldb_private::LLVMUserExpression::m_allow_cxx, lldb_private::LLVMUserExpression::m_allow_objc, and lldb_private::UserExpression::m_language.

◆ ~ClangUserExpression()

ClangUserExpression::~ClangUserExpression ( )
override

Definition at line 93 of file ClangUserExpression.cpp.

Member Function Documentation

◆ AddArguments()

bool ClangUserExpression::AddArguments ( ExecutionContext exe_ctx,
std::vector< lldb::addr_t > &  args,
lldb::addr_t  struct_address,
DiagnosticManager diagnostic_manager 
)
overrideprivatevirtual

◆ classof()

static bool lldb_private::ClangUserExpression::classof ( const Expression obj)
inlinestatic

Definition at line 47 of file ClangUserExpression.h.

References lldb_private::Expression::isA().

◆ Complete()

bool ClangUserExpression::Complete ( ExecutionContext exe_ctx,
CompletionRequest request,
unsigned  complete_pos 
)
overridevirtual

Attempts to find possible command line completions for the given (possible incomplete) user expression.

Parameters
[in]exe_ctxThe execution context to use when looking up entities that are needed for parsing and completing (locations of functions, types of variables, persistent variables, etc.)
[out]requestThe completion request to fill out. The completion should be a string that would complete the current token at the cursor position. Note that the string in the list replaces the current token in the command line.
[in]complete_posThe position of the cursor inside the user expression string. The completion process starts on the token that the cursor is in.
Returns
True if we added any completion results to the output; false otherwise.

Reimplemented from lldb_private::UserExpression.

Definition at line 767 of file ClangUserExpression.cpp.

References AbsPosToLineColumnPos(), lldb_private::ClangExpressionParser::Complete(), DeclMap(), lldb_private::eDiagnosticSeverityError, lldb_private::eExecutionPolicyTopLevel, lldb_private::EvaluateExpressionOptions::GetExecutionPolicy(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::LLVMUserExpression::GetMaterializer(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ExecutionContext::GetTargetPtr(), LIBLLDB_LOG_EXPRESSIONS, LLDB_LOGF, lldb_private::LLVMUserExpression::m_materializer_up, lldb_private::UserExpression::m_options, m_result_delegate, lldb_private::LLVMUserExpression::m_transformed_text, m_user_expression_start_pos, PrepareForParsing(), lldb_private::DiagnosticManager::PutString(), ResetDeclMap(), lldb_private::ClangASTSource::SetLookupsEnabled(), and lldb_private::ClangExpressionDeclMap::WillParse().

◆ CreateSourceCode()

void ClangUserExpression::CreateSourceCode ( DiagnosticManager diagnostic_manager,
ExecutionContext exe_ctx,
std::vector< std::string >  modules_to_import,
bool  for_completion 
)
private

◆ DeclMap()

ClangExpressionDeclMap* lldb_private::ClangUserExpression::DeclMap ( )
inline

◆ DidImportCxxModules()

bool lldb_private::ClangUserExpression::DidImportCxxModules ( ) const
inline

◆ GetResultAfterDematerialization()

lldb::ExpressionVariableSP ClangUserExpression::GetResultAfterDematerialization ( ExecutionContextScope exe_scope)
overridevirtual

◆ GetTypeSystemHelper()

ExpressionTypeSystemHelper* lldb_private::ClangUserExpression::GetTypeSystemHelper ( )
inlineoverridevirtual

Reimplemented from lldb_private::Expression.

Definition at line 152 of file ClangUserExpression.h.

References m_type_system_helper.

◆ GetWrapKind()

ClangExpressionSourceCode::WrapKind ClangUserExpression::GetWrapKind ( ) const
private

◆ isA()

bool lldb_private::ClangUserExpression::isA ( const void *  ClassID) const
inlineoverridevirtual

Reimplemented from lldb_private::LLVMUserExpression.

Definition at line 44 of file ClangUserExpression.h.

References lldb_private::LLVMUserExpression::isA().

◆ Parse()

bool ClangUserExpression::Parse ( DiagnosticManager diagnostic_manager,
ExecutionContext exe_ctx,
lldb_private::ExecutionPolicy  execution_policy,
bool  keep_result_in_memory,
bool  generate_debug_info 
)
overridevirtual

Parse the expression.

Parameters
[in]diagnostic_managerA diagnostic manager to report parse errors and warnings to.
[in]exe_ctxThe execution context to use when looking up entities that are needed for parsing (locations of functions, types of variables, persistent variables, etc.)
[in]execution_policyDetermines whether interpretation is possible or mandatory.
[in]keep_result_in_memoryTrue if the resulting persistent variable should reside in target memory, if applicable.
Returns
True on success (no errors); false otherwise.

Implements lldb_private::UserExpression.

Definition at line 571 of file ClangUserExpression.cpp.

References lldb_private::Status::AsCString(), DeclMap(), lldb_private::eDiagnosticSeverityError, lldb_private::eExecutionPolicyTopLevel, lldb_private::UserExpression::FunctionName(), lldb_private::EvaluateExpressionOptions::GetExecutionPolicy(), lldb_private::FileSpec::GetFilename(), lldb_private::DiagnosticManager::GetFixedExpression(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::LLVMUserExpression::GetMaterializer(), lldb_private::Target::GetPersistentExpressionStateForLanguage(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::DiagnosticManager::HasFixIts(), LIBLLDB_LOG_EXPRESSIONS, LLDB_INVALID_ADDRESS, LLDB_LOGF, lldb_private::LLVMUserExpression::m_can_interpret, lldb_private::LLVMUserExpression::m_execution_unit_sp, m_filename, lldb_private::UserExpression::m_fixed_text, m_include_directories, lldb_private::Expression::m_jit_end_addr, lldb_private::LLVMUserExpression::m_jit_module_wp, lldb_private::Expression::m_jit_process_wp, lldb_private::Expression::m_jit_start_addr, lldb_private::UserExpression::m_language, lldb_private::LLVMUserExpression::m_materializer_up, lldb_private::UserExpression::m_options, m_result_delegate, m_source_code, lldb_private::LLVMUserExpression::m_transformed_text, lldb_private::ClangExpressionParser::Parse(), lldb_private::ClangExpressionParser::PrepareForExecution(), PrepareForParsing(), lldb_private::DiagnosticManager::Printf(), lldb_private::DiagnosticManager::PutString(), ResetDeclMap(), lldb_private::ClangExpressionParser::RewriteExpression(), lldb_private::ClangExpressionParser::RunStaticInitializers(), lldb_private::ClangASTSource::SetLookupsEnabled(), lldb_private::Status::Success(), and lldb_private::ClangExpressionDeclMap::WillParse().

◆ PrepareForParsing()

bool ClangUserExpression::PrepareForParsing ( DiagnosticManager diagnostic_manager,
ExecutionContext exe_ctx,
bool  for_completion 
)
private

◆ ResetDeclMap() [1/2]

void lldb_private::ClangUserExpression::ResetDeclMap ( )
inline

◆ ResetDeclMap() [2/2]

void lldb_private::ClangUserExpression::ResetDeclMap ( ExecutionContext exe_ctx,
Materializer::PersistentVariableDelegate result_delegate,
bool  keep_result_in_memory 
)
inline

◆ ScanContext()

void ClangUserExpression::ScanContext ( ExecutionContext exe_ctx,
lldb_private::Status err 
)
overrideprivatevirtual

Populate m_in_cplusplus_method and m_in_objectivec_method based on the environment.

Implements lldb_private::LLVMUserExpression.

Definition at line 95 of file ClangUserExpression.cpp.

References lldb_private::TypeSystemClang::DeclContextGetAsCXXMethodDecl(), lldb_private::TypeSystemClang::DeclContextGetAsFunctionDecl(), lldb_private::TypeSystemClang::DeclContextGetAsObjCMethodDecl(), lldb_private::TypeSystemClang::DeclContextGetMetaData(), lldb::eLanguageTypeC, lldb::eLanguageTypeC11, lldb::eLanguageTypeC89, lldb::eLanguageTypeC99, lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeC_plus_plus_03, lldb::eLanguageTypeC_plus_plus_11, lldb::eLanguageTypeC_plus_plus_14, lldb::eLanguageTypeObjC, lldb::eLanguageTypeObjC_plus_plus, lldb_private::SymbolContext::function, lldb_private::Block::GetBlockVariableList(), lldb_private::Block::GetDeclContext(), lldb_private::Type::GetForwardCompilerType(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::SymbolContext::GetFunctionBlock(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::ClangASTMetadata::GetObjectPtrLanguage(), lldb_private::ValueObject::GetObjectRuntimeLanguage(), lldb_private::StackFrame::GetSymbolContext(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ClangASTMetadata::HasObjectPtr(), lldb_private::TypeSystemClang::IsObjCClassType(), lldb_private::TypeSystemClang::IsObjCObjectPointerType(), LIBLLDB_LOG_EXPRESSIONS, LLDB_LOGF, lldb_private::LLVMUserExpression::m_allow_cxx, lldb_private::LLVMUserExpression::m_allow_objc, m_ctx_obj, m_enforce_valid_object, m_in_cplusplus_method, m_in_objectivec_method, m_in_static_method, m_needs_object_ptr, lldb_private::LLVMUserExpression::m_target, and lldb_private::Status::SetErrorString().

Referenced by DidImportCxxModules(), and PrepareForParsing().

◆ SetupPersistentState()

bool ClangUserExpression::SetupPersistentState ( DiagnosticManager diagnostic_manager,
ExecutionContext exe_ctx 
)
private

Member Data Documentation

◆ ID

char ClangUserExpression::ID
staticprivate

Definition at line 41 of file ClangUserExpression.h.

◆ m_clang_state

ClangPersistentVariables* lldb_private::ClangUserExpression::m_clang_state
private

Definition at line 220 of file ClangUserExpression.h.

Referenced by CreateSourceCode(), and SetupPersistentState().

◆ m_ctx_obj

ValueObject* lldb_private::ClangUserExpression::m_ctx_obj
private

The object (if any) in which context the expression is evaluated.

See the comment to UserExpression::Evaluate for details.

Definition at line 227 of file ClangUserExpression.h.

Referenced by AddArguments(), CreateSourceCode(), ResetDeclMap(), and ScanContext().

◆ m_enforce_valid_object

bool lldb_private::ClangUserExpression::m_enforce_valid_object = true
private

True if the expression parser should enforce the presence of a valid class pointer in order to generate the expression as a method.

Definition at line 234 of file ClangUserExpression.h.

Referenced by ScanContext().

◆ m_filename

std::string lldb_private::ClangUserExpression::m_filename
private

File name used for the expression.

Definition at line 223 of file ClangUserExpression.h.

Referenced by CreateSourceCode(), and Parse().

◆ m_imported_cpp_modules

bool lldb_private::ClangUserExpression::m_imported_cpp_modules = false
private

True iff this expression explicitly imported C++ modules.

Definition at line 230 of file ClangUserExpression.h.

Referenced by DidImportCxxModules(), and PrepareForParsing().

◆ m_in_cplusplus_method

bool lldb_private::ClangUserExpression::m_in_cplusplus_method = false
private

True if the expression is compiled as a C++ member function (true if it was parsed when exe_ctx was in a C++ method).

Definition at line 237 of file ClangUserExpression.h.

Referenced by AddArguments(), GetWrapKind(), and ScanContext().

◆ m_in_objectivec_method

bool lldb_private::ClangUserExpression::m_in_objectivec_method = false
private

True if the expression is compiled as an Objective-C method (true if it was parsed when exe_ctx was in an Objective-C method).

Definition at line 240 of file ClangUserExpression.h.

Referenced by AddArguments(), GetWrapKind(), and ScanContext().

◆ m_in_static_method

bool lldb_private::ClangUserExpression::m_in_static_method = false
private

True if the expression is compiled as a static (or class) method (currently true if it was parsed when exe_ctx was in an Objective-C class method).

Definition at line 244 of file ClangUserExpression.h.

Referenced by GetWrapKind(), and ScanContext().

◆ m_include_directories

std::vector<std::string> lldb_private::ClangUserExpression::m_include_directories
private

The include directories that should be used when parsing the expression.

Definition at line 213 of file ClangUserExpression.h.

Referenced by Parse(), and PrepareForParsing().

◆ m_needs_object_ptr

bool lldb_private::ClangUserExpression::m_needs_object_ptr = false
private

True if "this" or "self" must be looked up and passed in.

False if the expression doesn't really use them and they can be NULL.

Definition at line 247 of file ClangUserExpression.h.

Referenced by AddArguments(), and ScanContext().

◆ m_result_delegate

ResultDelegate lldb_private::ClangUserExpression::m_result_delegate
private

◆ m_source_code

std::unique_ptr<ClangExpressionSourceCode> lldb_private::ClangUserExpression::m_source_code
private

Definition at line 221 of file ClangUserExpression.h.

Referenced by CreateSourceCode(), and Parse().

◆ m_type_system_helper

ClangUserExpressionHelper lldb_private::ClangUserExpression::m_type_system_helper
private

Definition at line 195 of file ClangUserExpression.h.

Referenced by DeclMap(), GetTypeSystemHelper(), and ResetDeclMap().

◆ m_user_expression_start_pos

llvm::Optional<size_t> lldb_private::ClangUserExpression::m_user_expression_start_pos
private

The absolute character position in the transformed source code where the user code (as typed by the user) starts.

If the variable is empty, then we were not able to calculate this position.

Definition at line 218 of file ClangUserExpression.h.

Referenced by Complete(), and CreateSourceCode().


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