forked from OSchip/llvm-project
Rename ClangUserExpression members to avoid confusion with language.
The new names clarify that the members have to do with the execution context and not the language. For example, m_cplusplus was renamed to m_in_cplusplus_method. llvm-svn: 241132
This commit is contained in:
parent
3c20ab2f2c
commit
53f34c8736
|
@ -306,7 +306,7 @@ public:
|
|||
static const Error::ValueType kNoResult = 0x1001; ///< ValueObject::GetError() returns this if there is no result from the expression.
|
||||
private:
|
||||
//------------------------------------------------------------------
|
||||
/// Populate m_cplusplus and m_objectivec based on the environment.
|
||||
/// Populate m_in_cplusplus_method and m_in_objectivec_method based on the environment.
|
||||
//------------------------------------------------------------------
|
||||
|
||||
void
|
||||
|
@ -348,9 +348,9 @@ private:
|
|||
std::unique_ptr<ASTResultSynthesizer> m_result_synthesizer; ///< The result synthesizer, if one is needed.
|
||||
lldb::ModuleWP m_jit_module_wp;
|
||||
bool m_enforce_valid_object; ///< True if the expression parser should enforce the presence of a valid class pointer in order to generate the expression as a method.
|
||||
bool m_cplusplus; ///< True if the expression is compiled as a C++ member function (true if it was parsed when exe_ctx was in a C++ method).
|
||||
bool m_objectivec; ///< 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).
|
||||
bool m_static_method; ///< 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).
|
||||
bool m_in_cplusplus_method; ///< True if the expression is compiled as a C++ member function (true if it was parsed when exe_ctx was in a C++ method).
|
||||
bool m_in_objectivec_method; ///< 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).
|
||||
bool m_in_static_method; ///< 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).
|
||||
bool m_needs_object_ptr; ///< 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.
|
||||
bool m_const_object; ///< True if "this" is const.
|
||||
Target *m_target; ///< The target for storing persistent data like types and variables.
|
||||
|
|
|
@ -72,9 +72,9 @@ ClangUserExpression::ClangUserExpression (const char *expr,
|
|||
m_result_synthesizer(),
|
||||
m_jit_module_wp(),
|
||||
m_enforce_valid_object (true),
|
||||
m_cplusplus (false),
|
||||
m_objectivec (false),
|
||||
m_static_method(false),
|
||||
m_in_cplusplus_method (false),
|
||||
m_in_objectivec_method (false),
|
||||
m_in_static_method(false),
|
||||
m_needs_object_ptr (false),
|
||||
m_const_object (false),
|
||||
m_target (NULL),
|
||||
|
@ -196,7 +196,7 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
|
|||
}
|
||||
}
|
||||
|
||||
m_cplusplus = true;
|
||||
m_in_cplusplus_method = true;
|
||||
m_needs_object_ptr = true;
|
||||
}
|
||||
}
|
||||
|
@ -227,11 +227,11 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
|
|||
}
|
||||
}
|
||||
|
||||
m_objectivec = true;
|
||||
m_in_objectivec_method = true;
|
||||
m_needs_object_ptr = true;
|
||||
|
||||
if (!method_decl->isInstanceMethod())
|
||||
m_static_method = true;
|
||||
m_in_static_method = true;
|
||||
}
|
||||
}
|
||||
else if (clang::FunctionDecl *function_decl = llvm::dyn_cast<clang::FunctionDecl>(decl_context))
|
||||
|
@ -270,7 +270,7 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
|
|||
}
|
||||
}
|
||||
|
||||
m_cplusplus = true;
|
||||
m_in_cplusplus_method = true;
|
||||
m_needs_object_ptr = true;
|
||||
}
|
||||
else if (language == lldb::eLanguageTypeObjC)
|
||||
|
@ -319,7 +319,7 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
|
|||
}
|
||||
else if (self_clang_type.IsObjCObjectPointerType())
|
||||
{
|
||||
m_objectivec = true;
|
||||
m_in_objectivec_method = true;
|
||||
m_needs_object_ptr = true;
|
||||
}
|
||||
else
|
||||
|
@ -330,7 +330,7 @@ ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Error &err)
|
|||
}
|
||||
else
|
||||
{
|
||||
m_objectivec = true;
|
||||
m_in_objectivec_method = true;
|
||||
m_needs_object_ptr = true;
|
||||
}
|
||||
}
|
||||
|
@ -491,14 +491,14 @@ ClangUserExpression::Parse (Stream &error_stream,
|
|||
|
||||
lldb::LanguageType lang_type;
|
||||
|
||||
if (m_cplusplus)
|
||||
if (m_in_cplusplus_method)
|
||||
lang_type = lldb::eLanguageTypeC_plus_plus;
|
||||
else if(m_objectivec)
|
||||
else if (m_in_objectivec_method)
|
||||
lang_type = lldb::eLanguageTypeObjC;
|
||||
else
|
||||
lang_type = lldb::eLanguageTypeC;
|
||||
|
||||
if (!source_code->GetText(m_transformed_text, lang_type, m_const_object, m_static_method, exe_ctx))
|
||||
if (!source_code->GetText(m_transformed_text, lang_type, m_const_object, m_in_static_method, exe_ctx))
|
||||
{
|
||||
error_stream.PutCString ("error: couldn't construct expression body");
|
||||
return false;
|
||||
|
@ -701,11 +701,11 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream,
|
|||
{
|
||||
ConstString object_name;
|
||||
|
||||
if (m_cplusplus)
|
||||
if (m_in_cplusplus_method)
|
||||
{
|
||||
object_name.SetCString("this");
|
||||
}
|
||||
else if (m_objectivec)
|
||||
else if (m_in_objectivec_method)
|
||||
{
|
||||
object_name.SetCString("self");
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ ClangUserExpression::PrepareToExecuteJITExpression (Stream &error_stream,
|
|||
object_ptr = 0;
|
||||
}
|
||||
|
||||
if (m_objectivec)
|
||||
if (m_in_objectivec_method)
|
||||
{
|
||||
ConstString cmd_name("_cmd");
|
||||
|
||||
|
@ -876,7 +876,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
{
|
||||
args.push_back(object_ptr);
|
||||
|
||||
if (m_objectivec)
|
||||
if (m_in_objectivec_method)
|
||||
args.push_back(cmd_ptr);
|
||||
}
|
||||
|
||||
|
@ -913,7 +913,7 @@ ClangUserExpression::Execute (Stream &error_stream,
|
|||
|
||||
if (m_needs_object_ptr) {
|
||||
args.push_back(object_ptr);
|
||||
if (m_objectivec)
|
||||
if (m_in_objectivec_method)
|
||||
args.push_back(cmd_ptr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue