Author: Med Ismail Bennani Date: 2023-02-28T12:52:32-08:00 New Revision: 35d17c17a6702c70e877c63e9f7c4ce3e35c1bb9
URL: https://github.com/llvm/llvm-project/commit/35d17c17a6702c70e877c63e9f7c4ce3e35c1bb9 DIFF: https://github.com/llvm/llvm-project/commit/35d17c17a6702c70e877c63e9f7c4ce3e35c1bb9.diff LOG: [lldb] Remove const qualifier on bool argument passed by value Signed-off-by: Med Ismail Bennani <medismail.benn...@gmail.com> Added: Modified: lldb/include/lldb/Interpreter/ScriptInterpreter.h lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h Removed: ################################################################################ diff --git a/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/lldb/include/lldb/Interpreter/ScriptInterpreter.h index 7db1e41d6cb06..b6b14c80273ca 100644 --- a/lldb/include/lldb/Interpreter/ScriptInterpreter.h +++ b/lldb/include/lldb/Interpreter/ScriptInterpreter.h @@ -186,7 +186,7 @@ class ScriptInterpreter : public PluginInterface { virtual Status GenerateBreakpointCommandCallbackData(StringList &input, std::string &output, bool has_extra_args, - const bool is_callback) { + bool is_callback) { Status error; error.SetErrorString("not implemented"); return error; @@ -194,7 +194,7 @@ class ScriptInterpreter : public PluginInterface { virtual bool GenerateWatchpointCommandCallbackData(StringList &input, std::string &output, - const bool is_callback) { + bool is_callback) { return false; } @@ -361,7 +361,7 @@ class ScriptInterpreter : public PluginInterface { virtual Status GenerateFunction(const char *signature, const StringList &input, - const bool is_callback) { + bool is_callback) { Status error; error.SetErrorString("unimplemented"); return error; @@ -382,7 +382,7 @@ class ScriptInterpreter : public PluginInterface { virtual Status SetBreakpointCommandCallback(BreakpointOptions &bp_options, const char *callback_text, - const bool is_callback) { + bool is_callback) { Status error; error.SetErrorString("unimplemented"); return error; @@ -414,7 +414,7 @@ class ScriptInterpreter : public PluginInterface { /// Set a one-liner as the callback for the watchpoint. virtual void SetWatchpointCommandCallback(WatchpointOptions *wp_options, const char *user_input, - const bool is_callback) {} + bool is_callback) {} virtual bool GetScriptedSummary(const char *function_name, lldb::ValueObjectSP valobj, diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h index b90a12d72bfa1..3f9f42c0c3b6e 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h +++ b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h @@ -89,7 +89,7 @@ class ScriptInterpreterLua : public ScriptInterpreter { Status SetBreakpointCommandCallback(BreakpointOptions &bp_options, const char *command_body_text, - const bool is_callback) override; + bool is_callback) override; void SetWatchpointCommandCallback(WatchpointOptions *wp_options, const char *command_body_text) override; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 00d8d38f4421d..6472a9301ed6e 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -1217,7 +1217,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback( Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback( BreakpointOptions &bp_options, const char *command_body_text, - const bool is_callback) { + bool is_callback) { return SetBreakpointCommandCallback(bp_options, command_body_text, {}, /*uses_extra_args=*/false, is_callback); } @@ -1226,7 +1226,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback( Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback( BreakpointOptions &bp_options, const char *command_body_text, StructuredData::ObjectSP extra_args_sp, bool uses_extra_args, - const bool is_callback) { + bool is_callback) { auto data_up = std::make_unique<CommandDataPython>(extra_args_sp); // Split the command_body_text into lines, and pass that to // GenerateBreakpointCommandCallbackData. That will wrap the body in an @@ -1250,7 +1250,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback( // Set a Python one-liner as the callback for the watchpoint. void ScriptInterpreterPythonImpl::SetWatchpointCommandCallback( WatchpointOptions *wp_options, const char *user_input, - const bool is_callback) { + bool is_callback) { auto data_up = std::make_unique<WatchpointOptions::CommandData>(); // It's necessary to set both user_source and script_source to the oneliner. @@ -1283,7 +1283,7 @@ Status ScriptInterpreterPythonImpl::ExportFunctionDefinitionToInterpreter( Status ScriptInterpreterPythonImpl::GenerateFunction(const char *signature, const StringList &input, - const bool is_callback) { + bool is_callback) { Status error; int num_lines = input.GetSize(); if (num_lines == 0) { @@ -2003,7 +2003,7 @@ bool ScriptInterpreterPythonImpl::GenerateTypeSynthClass( Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData( StringList &user_input, std::string &output, bool has_extra_args, - const bool is_callback) { + bool is_callback) { static uint32_t num_created_functions = 0; user_input.RemoveBlankLines(); StreamString sstr; @@ -2032,7 +2032,7 @@ Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData( } bool ScriptInterpreterPythonImpl::GenerateWatchpointCommandCallbackData( - StringList &user_input, std::string &output, const bool is_callback) { + StringList &user_input, std::string &output, bool is_callback) { static uint32_t num_created_functions = 0; user_input.RemoveBlankLines(); StreamString sstr; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h index b3568e6c91eda..21fdf12505f86 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h @@ -189,16 +189,16 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython { const lldb_private::ExecutionContext &exe_ctx) override; Status GenerateFunction(const char *signature, const StringList &input, - const bool is_callback) override; + bool is_callback) override; Status GenerateBreakpointCommandCallbackData(StringList &input, std::string &output, bool has_extra_args, - const bool is_callback) override; + bool is_callback) override; bool GenerateWatchpointCommandCallbackData(StringList &input, std::string &output, - const bool is_callback) override; + bool is_callback) override; bool GetScriptedSummary(const char *function_name, lldb::ValueObjectSP valobj, StructuredData::ObjectSP &callee_wrapper_sp, @@ -262,7 +262,7 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython { /// Set the callback body text into the callback for the breakpoint. Status SetBreakpointCommandCallback(BreakpointOptions &bp_options, const char *callback_body, - const bool is_callback) override; + bool is_callback) override; Status SetBreakpointCommandCallbackFunction( BreakpointOptions &bp_options, const char *function_name, @@ -277,12 +277,12 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython { const char *command_body_text, StructuredData::ObjectSP extra_args_sp, bool uses_extra_args, - const bool is_callback); + bool is_callback); /// Set a one-liner as the callback for the watchpoint. void SetWatchpointCommandCallback(WatchpointOptions *wp_options, const char *user_input, - const bool is_callback) override; + bool is_callback) override; const char *GetDictionaryName() { return m_dictionary_name.c_str(); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits