[Lldb-commits] [lldb] r241132 - Rename ClangUserExpression members to avoid confusion with language.
Dawn Perchik
dawn at burble.org
Tue Jun 30 17:54:02 PDT 2015
Author: dperchik
Date: Tue Jun 30 19:54:02 2015
New Revision: 241132
URL: http://llvm.org/viewvc/llvm-project?rev=241132&view=rev
Log:
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.
Modified:
lldb/trunk/include/lldb/Expression/ClangUserExpression.h
lldb/trunk/source/Expression/ClangUserExpression.cpp
Modified: lldb/trunk/include/lldb/Expression/ClangUserExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ClangUserExpression.h?rev=241132&r1=241131&r2=241132&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ClangUserExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/ClangUserExpression.h Tue Jun 30 19:54:02 2015
@@ -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.
Modified: lldb/trunk/source/Expression/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangUserExpression.cpp?rev=241132&r1=241131&r2=241132&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Expression/ClangUserExpression.cpp Tue Jun 30 19:54:02 2015
@@ -72,9 +72,9 @@ ClangUserExpression::ClangUserExpression
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(Executi
}
}
- m_cplusplus = true;
+ m_in_cplusplus_method = true;
m_needs_object_ptr = true;
}
}
@@ -227,11 +227,11 @@ ClangUserExpression::ScanContext(Executi
}
}
- 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(Executi
}
}
- m_cplusplus = true;
+ m_in_cplusplus_method = true;
m_needs_object_ptr = true;
}
else if (language == lldb::eLanguageTypeObjC)
@@ -319,7 +319,7 @@ ClangUserExpression::ScanContext(Executi
}
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(Executi
}
else
{
- m_objectivec = true;
+ m_in_objectivec_method = true;
m_needs_object_ptr = true;
}
}
@@ -491,14 +491,14 @@ ClangUserExpression::Parse (Stream &erro
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::PrepareToExecuteJIT
{
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::PrepareToExecuteJIT
object_ptr = 0;
}
- if (m_objectivec)
+ if (m_in_objectivec_method)
{
ConstString cmd_name("_cmd");
@@ -876,7 +876,7 @@ ClangUserExpression::Execute (Stream &er
{
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 &er
if (m_needs_object_ptr) {
args.push_back(object_ptr);
- if (m_objectivec)
+ if (m_in_objectivec_method)
args.push_back(cmd_ptr);
}
More information about the lldb-commits
mailing list