Author: teemperor Date: Fri Aug 30 00:44:29 2019 New Revision: 370440 URL: http://llvm.org/viewvc/llvm-project?rev=370440&view=rev Log: [lldb][NFC] Move Clang-specific flags to ClangUserExpression
LLVMUserExpression doesn't use these variables and they are all specific to Clang. Also removes m_const_object as this was actually never used by anyone (and Clang didn't report it as we assigned it in the constructor which seems to count as use). Modified: lldb/trunk/include/lldb/Expression/LLVMUserExpression.h lldb/trunk/source/Expression/LLVMUserExpression.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h Modified: lldb/trunk/include/lldb/Expression/LLVMUserExpression.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/LLVMUserExpression.h?rev=370440&r1=370439&r2=370440&view=diff ============================================================================== --- lldb/trunk/include/lldb/Expression/LLVMUserExpression.h (original) +++ lldb/trunk/include/lldb/Expression/LLVMUserExpression.h Fri Aug 30 00:44:29 2019 @@ -103,22 +103,6 @@ protected: /// when running the /// expression. 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_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/LLVMUserExpression.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/LLVMUserExpression.cpp?rev=370440&r1=370439&r2=370440&view=diff ============================================================================== --- lldb/trunk/source/Expression/LLVMUserExpression.cpp (original) +++ lldb/trunk/source/Expression/LLVMUserExpression.cpp Fri Aug 30 00:44:29 2019 @@ -48,9 +48,7 @@ LLVMUserExpression::LLVMUserExpression(E m_stack_frame_bottom(LLDB_INVALID_ADDRESS), m_stack_frame_top(LLDB_INVALID_ADDRESS), m_allow_cxx(false), m_allow_objc(false), m_transformed_text(), m_execution_unit_sp(), - m_materializer_up(), m_jit_module_wp(), m_enforce_valid_object(true), - m_in_cplusplus_method(false), m_in_objectivec_method(false), - m_in_static_method(false), m_needs_object_ptr(false), m_target(nullptr), + m_materializer_up(), m_jit_module_wp(), m_can_interpret(false), m_materialized_address(LLDB_INVALID_ADDRESS) {} LLVMUserExpression::~LLVMUserExpression() { Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h?rev=370440&r1=370439&r2=370440&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h Fri Aug 30 00:44:29 2019 @@ -223,6 +223,23 @@ private: /// True iff this expression explicitly imported C++ modules. bool m_imported_cpp_modules = false; + + /// 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_enforce_valid_object = true; + /// 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_cplusplus_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). + bool m_in_objectivec_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). + bool m_in_static_method = false; + /// 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_needs_object_ptr = false; }; } // namespace lldb_private _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits