From 35e9ea38127b99a261f946a415d3641538b8baa3 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 28 Apr 2016 08:16:19 +0000 Subject: 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 --- lldb/source/Expression/ExpressionSourceCode.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/source/Expression/ExpressionSourceCode.cpp') diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp index d82ed608407..14e98105b8a 100644 --- a/lldb/source/Expression/ExpressionSourceCode.cpp +++ b/lldb/source/Expression/ExpressionSourceCode.cpp @@ -195,7 +195,7 @@ AddLocalVariableDecls(const lldb::VariableListSP &var_list_sp, StreamString &str } } -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 @@ bool ExpressionSourceCode::GetText (std::string &text, lldb::LanguageType wrappi 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; -- cgit v1.2.3