Revert "Fixed a bug where const this would cause parser errors about $__lldb_expr."
This reverts commit r267833 as it breaks the build. It looks like some work in progress got
committed together with the actual fix, but I'm not sure which one is which, so I'll revert the
whole patch and let author resumbit it after fixing the build error.
llvm-svn: 267861
diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp
index d82ed60..14e9810 100644
--- a/lldb/source/Expression/ExpressionSourceCode.cpp
+++ b/lldb/source/Expression/ExpressionSourceCode.cpp
@@ -195,7 +195,7 @@
}
}
-bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrapping_language, bool static_method, ExecutionContext &exe_ctx) const
+bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrapping_language, bool const_object, bool static_method, ExecutionContext &exe_ctx) const
{
const char *target_specific_defines = "typedef signed char BOOL;\n";
std::string module_macros;
@@ -337,12 +337,13 @@
break;
case lldb::eLanguageTypeC_plus_plus:
wrap_stream.Printf("void \n"
- "$__lldb_class::%s(void *$__lldb_arg) \n"
+ "$__lldb_class::%s(void *$__lldb_arg) %s\n"
"{ \n"
" %s; \n"
"%s"
"} \n",
m_name.c_str(),
+ (const_object ? "const" : ""),
lldb_local_var_decls.GetData(),
tagged_body.c_str());
break;
diff --git a/lldb/source/Expression/LLVMUserExpression.cpp b/lldb/source/Expression/LLVMUserExpression.cpp
index 0b96980..60f68b1 100644
--- a/lldb/source/Expression/LLVMUserExpression.cpp
+++ b/lldb/source/Expression/LLVMUserExpression.cpp
@@ -59,6 +59,7 @@
m_in_objectivec_method(false),
m_in_static_method(false),
m_needs_object_ptr(false),
+ m_const_object(false),
m_target(NULL),
m_can_interpret(false),
m_materialized_address(LLDB_INVALID_ADDRESS)