Skip to content

Commit 2bc5b1c

Browse files
committed
[lldb] Remove const qualifier on bool argument passed by value
Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent 2d7db4c commit 2bc5b1c

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

lldb/include/lldb/Interpreter/ScriptInterpreter.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,15 @@ class ScriptInterpreter : public PluginInterface {
181181
virtual Status GenerateBreakpointCommandCallbackData(StringList &input,
182182
std::string &output,
183183
bool has_extra_args,
184-
const bool is_callback) {
184+
bool is_callback) {
185185
Status error;
186186
error.SetErrorString("not implemented");
187187
return error;
188188
}
189189

190190
virtual bool GenerateWatchpointCommandCallbackData(StringList &input,
191191
std::string &output,
192-
const bool is_callback) {
192+
bool is_callback) {
193193
return false;
194194
}
195195

@@ -356,7 +356,7 @@ class ScriptInterpreter : public PluginInterface {
356356

357357
virtual Status GenerateFunction(const char *signature,
358358
const StringList &input,
359-
const bool is_callback) {
359+
bool is_callback) {
360360
Status error;
361361
error.SetErrorString("unimplemented");
362362
return error;
@@ -377,7 +377,7 @@ class ScriptInterpreter : public PluginInterface {
377377

378378
virtual Status SetBreakpointCommandCallback(BreakpointOptions &bp_options,
379379
const char *callback_text,
380-
const bool is_callback) {
380+
bool is_callback) {
381381
Status error;
382382
error.SetErrorString("unimplemented");
383383
return error;
@@ -409,7 +409,7 @@ class ScriptInterpreter : public PluginInterface {
409409
/// Set a one-liner as the callback for the watchpoint.
410410
virtual void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
411411
const char *user_input,
412-
const bool is_callback) {}
412+
bool is_callback) {}
413413

414414
virtual bool GetScriptedSummary(const char *function_name,
415415
lldb::ValueObjectSP valobj,

lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class ScriptInterpreterLua : public ScriptInterpreter {
8989

9090
Status SetBreakpointCommandCallback(BreakpointOptions &bp_options,
9191
const char *command_body_text,
92-
const bool is_callback) override;
92+
bool is_callback) override;
9393

9494
void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
9595
const char *command_body_text) override;

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12131213

12141214
Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12151215
BreakpointOptions &bp_options, const char *command_body_text,
1216-
const bool is_callback) {
1216+
bool is_callback) {
12171217
return SetBreakpointCommandCallback(bp_options, command_body_text, {},
12181218
/*uses_extra_args=*/false, is_callback);
12191219
}
@@ -1222,7 +1222,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12221222
Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12231223
BreakpointOptions &bp_options, const char *command_body_text,
12241224
StructuredData::ObjectSP extra_args_sp, bool uses_extra_args,
1225-
const bool is_callback) {
1225+
bool is_callback) {
12261226
auto data_up = std::make_unique<CommandDataPython>(extra_args_sp);
12271227
// Split the command_body_text into lines, and pass that to
12281228
// GenerateBreakpointCommandCallbackData. That will wrap the body in an
@@ -1246,7 +1246,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12461246
// Set a Python one-liner as the callback for the watchpoint.
12471247
void ScriptInterpreterPythonImpl::SetWatchpointCommandCallback(
12481248
WatchpointOptions *wp_options, const char *user_input,
1249-
const bool is_callback) {
1249+
bool is_callback) {
12501250
auto data_up = std::make_unique<WatchpointOptions::CommandData>();
12511251

12521252
// It's necessary to set both user_source and script_source to the oneliner.
@@ -1279,7 +1279,7 @@ Status ScriptInterpreterPythonImpl::ExportFunctionDefinitionToInterpreter(
12791279

12801280
Status ScriptInterpreterPythonImpl::GenerateFunction(const char *signature,
12811281
const StringList &input,
1282-
const bool is_callback) {
1282+
bool is_callback) {
12831283
Status error;
12841284
int num_lines = input.GetSize();
12851285
if (num_lines == 0) {
@@ -1996,7 +1996,7 @@ bool ScriptInterpreterPythonImpl::GenerateTypeSynthClass(
19961996

19971997
Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData(
19981998
StringList &user_input, std::string &output, bool has_extra_args,
1999-
const bool is_callback) {
1999+
bool is_callback) {
20002000
static uint32_t num_created_functions = 0;
20012001
user_input.RemoveBlankLines();
20022002
StreamString sstr;
@@ -2025,7 +2025,7 @@ Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData(
20252025
}
20262026

20272027
bool ScriptInterpreterPythonImpl::GenerateWatchpointCommandCallbackData(
2028-
StringList &user_input, std::string &output, const bool is_callback) {
2028+
StringList &user_input, std::string &output, bool is_callback) {
20292029
static uint32_t num_created_functions = 0;
20302030
user_input.RemoveBlankLines();
20312031
StreamString sstr;

lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,16 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
189189
const lldb_private::ExecutionContext &exe_ctx) override;
190190

191191
Status GenerateFunction(const char *signature, const StringList &input,
192-
const bool is_callback) override;
192+
bool is_callback) override;
193193

194194
Status GenerateBreakpointCommandCallbackData(StringList &input,
195195
std::string &output,
196196
bool has_extra_args,
197-
const bool is_callback) override;
197+
bool is_callback) override;
198198

199199
bool GenerateWatchpointCommandCallbackData(StringList &input,
200200
std::string &output,
201-
const bool is_callback) override;
201+
bool is_callback) override;
202202

203203
bool GetScriptedSummary(const char *function_name, lldb::ValueObjectSP valobj,
204204
StructuredData::ObjectSP &callee_wrapper_sp,
@@ -259,7 +259,7 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
259259
/// Set the callback body text into the callback for the breakpoint.
260260
Status SetBreakpointCommandCallback(BreakpointOptions &bp_options,
261261
const char *callback_body,
262-
const bool is_callback) override;
262+
bool is_callback) override;
263263

264264
Status SetBreakpointCommandCallbackFunction(
265265
BreakpointOptions &bp_options, const char *function_name,
@@ -274,12 +274,12 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
274274
const char *command_body_text,
275275
StructuredData::ObjectSP extra_args_sp,
276276
bool uses_extra_args,
277-
const bool is_callback);
277+
bool is_callback);
278278

279279
/// Set a one-liner as the callback for the watchpoint.
280280
void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
281281
const char *user_input,
282-
const bool is_callback) override;
282+
bool is_callback) override;
283283

284284
const char *GetDictionaryName() { return m_dictionary_name.c_str(); }
285285

0 commit comments

Comments
 (0)