Skip to content

Commit 35d17c1

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

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
@@ -186,15 +186,15 @@ class ScriptInterpreter : public PluginInterface {
186186
virtual Status GenerateBreakpointCommandCallbackData(StringList &input,
187187
std::string &output,
188188
bool has_extra_args,
189-
const bool is_callback) {
189+
bool is_callback) {
190190
Status error;
191191
error.SetErrorString("not implemented");
192192
return error;
193193
}
194194

195195
virtual bool GenerateWatchpointCommandCallbackData(StringList &input,
196196
std::string &output,
197-
const bool is_callback) {
197+
bool is_callback) {
198198
return false;
199199
}
200200

@@ -361,7 +361,7 @@ class ScriptInterpreter : public PluginInterface {
361361

362362
virtual Status GenerateFunction(const char *signature,
363363
const StringList &input,
364-
const bool is_callback) {
364+
bool is_callback) {
365365
Status error;
366366
error.SetErrorString("unimplemented");
367367
return error;
@@ -382,7 +382,7 @@ class ScriptInterpreter : public PluginInterface {
382382

383383
virtual Status SetBreakpointCommandCallback(BreakpointOptions &bp_options,
384384
const char *callback_text,
385-
const bool is_callback) {
385+
bool is_callback) {
386386
Status error;
387387
error.SetErrorString("unimplemented");
388388
return error;
@@ -414,7 +414,7 @@ class ScriptInterpreter : public PluginInterface {
414414
/// Set a one-liner as the callback for the watchpoint.
415415
virtual void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
416416
const char *user_input,
417-
const bool is_callback) {}
417+
bool is_callback) {}
418418

419419
virtual bool GetScriptedSummary(const char *function_name,
420420
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
@@ -1217,7 +1217,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12171217

12181218
Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12191219
BreakpointOptions &bp_options, const char *command_body_text,
1220-
const bool is_callback) {
1220+
bool is_callback) {
12211221
return SetBreakpointCommandCallback(bp_options, command_body_text, {},
12221222
/*uses_extra_args=*/false, is_callback);
12231223
}
@@ -1226,7 +1226,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12261226
Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12271227
BreakpointOptions &bp_options, const char *command_body_text,
12281228
StructuredData::ObjectSP extra_args_sp, bool uses_extra_args,
1229-
const bool is_callback) {
1229+
bool is_callback) {
12301230
auto data_up = std::make_unique<CommandDataPython>(extra_args_sp);
12311231
// Split the command_body_text into lines, and pass that to
12321232
// GenerateBreakpointCommandCallbackData. That will wrap the body in an
@@ -1250,7 +1250,7 @@ Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
12501250
// Set a Python one-liner as the callback for the watchpoint.
12511251
void ScriptInterpreterPythonImpl::SetWatchpointCommandCallback(
12521252
WatchpointOptions *wp_options, const char *user_input,
1253-
const bool is_callback) {
1253+
bool is_callback) {
12541254
auto data_up = std::make_unique<WatchpointOptions::CommandData>();
12551255

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

12841284
Status ScriptInterpreterPythonImpl::GenerateFunction(const char *signature,
12851285
const StringList &input,
1286-
const bool is_callback) {
1286+
bool is_callback) {
12871287
Status error;
12881288
int num_lines = input.GetSize();
12891289
if (num_lines == 0) {
@@ -2003,7 +2003,7 @@ bool ScriptInterpreterPythonImpl::GenerateTypeSynthClass(
20032003

20042004
Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData(
20052005
StringList &user_input, std::string &output, bool has_extra_args,
2006-
const bool is_callback) {
2006+
bool is_callback) {
20072007
static uint32_t num_created_functions = 0;
20082008
user_input.RemoveBlankLines();
20092009
StreamString sstr;
@@ -2032,7 +2032,7 @@ Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData(
20322032
}
20332033

20342034
bool ScriptInterpreterPythonImpl::GenerateWatchpointCommandCallbackData(
2035-
StringList &user_input, std::string &output, const bool is_callback) {
2035+
StringList &user_input, std::string &output, bool is_callback) {
20362036
static uint32_t num_created_functions = 0;
20372037
user_input.RemoveBlankLines();
20382038
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,
@@ -262,7 +262,7 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
262262
/// Set the callback body text into the callback for the breakpoint.
263263
Status SetBreakpointCommandCallback(BreakpointOptions &bp_options,
264264
const char *callback_body,
265-
const bool is_callback) override;
265+
bool is_callback) override;
266266

267267
Status SetBreakpointCommandCallbackFunction(
268268
BreakpointOptions &bp_options, const char *function_name,
@@ -277,12 +277,12 @@ class ScriptInterpreterPythonImpl : public ScriptInterpreterPython {
277277
const char *command_body_text,
278278
StructuredData::ObjectSP extra_args_sp,
279279
bool uses_extra_args,
280-
const bool is_callback);
280+
bool is_callback);
281281

282282
/// Set a one-liner as the callback for the watchpoint.
283283
void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
284284
const char *user_input,
285-
const bool is_callback) override;
285+
bool is_callback) override;
286286

287287
const char *GetDictionaryName() { return m_dictionary_name.c_str(); }
288288

0 commit comments

Comments
 (0)