Skip to content

Commit 8235253

Browse files
committed
[lldb] Remove unused CommandObjectRegexCommand::m_max_matches (NFC)
1 parent 181d6e2 commit 8235253

File tree

4 files changed

+15
-19
lines changed

4 files changed

+15
-19
lines changed

lldb/source/Commands/CommandObjectCommands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ a number follows 'f':"
880880
Status error;
881881
auto name = command[0].ref();
882882
m_regex_cmd_up = std::make_unique<CommandObjectRegexCommand>(
883-
m_interpreter, name, m_options.GetHelp(), m_options.GetSyntax(), 10, 0,
883+
m_interpreter, name, m_options.GetHelp(), m_options.GetSyntax(), 0,
884884
true);
885885

886886
if (argc == 1) {

lldb/source/Commands/CommandObjectRegexCommand.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ using namespace lldb_private;
1919
// CommandObjectRegexCommand constructor
2020
CommandObjectRegexCommand::CommandObjectRegexCommand(
2121
CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help,
22-
llvm::StringRef syntax, uint32_t max_matches, uint32_t completion_type_mask,
23-
bool is_removable)
22+
llvm::StringRef syntax, uint32_t completion_type_mask, bool is_removable)
2423
: CommandObjectRaw(interpreter, name, help, syntax),
25-
m_max_matches(max_matches), m_completion_type_mask(completion_type_mask),
24+
m_completion_type_mask(completion_type_mask),
2625
m_is_removable(is_removable) {}
2726

2827
// Destructor

lldb/source/Commands/CommandObjectRegexCommand.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CommandObjectRegexCommand : public CommandObjectRaw {
2323
public:
2424
CommandObjectRegexCommand(CommandInterpreter &interpreter,
2525
llvm::StringRef name, llvm::StringRef help,
26-
llvm::StringRef syntax, uint32_t max_matches,
26+
llvm::StringRef syntax,
2727
uint32_t completion_type_mask, bool is_removable);
2828

2929
~CommandObjectRegexCommand() override;
@@ -50,7 +50,6 @@ class CommandObjectRegexCommand : public CommandObjectRaw {
5050
};
5151

5252
typedef std::list<Entry> EntryCollection;
53-
const uint32_t m_max_matches;
5453
const uint32_t m_completion_type_mask;
5554
EntryCollection m_entries;
5655
bool m_is_removable;

lldb/source/Interpreter/CommandInterpreter.cpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@ void CommandInterpreter::LoadCommandDictionary() {
612612
"current file\n"
613613
" // containing text 'break "
614614
"here'.\n",
615-
3,
616615
CommandCompletions::eSymbolCompletion |
617616
CommandCompletions::eSourceFileCompletion,
618617
false));
@@ -666,7 +665,6 @@ void CommandInterpreter::LoadCommandDictionary() {
666665
"current file\n"
667666
" // containing text 'break "
668667
"here'.\n",
669-
2,
670668
CommandCompletions::eSymbolCompletion |
671669
CommandCompletions::eSourceFileCompletion,
672670
false));
@@ -694,7 +692,7 @@ void CommandInterpreter::LoadCommandDictionary() {
694692
std::unique_ptr<CommandObjectRegexCommand> attach_regex_cmd_up(
695693
new CommandObjectRegexCommand(
696694
*this, "_regexp-attach", "Attach to process by ID or name.",
697-
"_regexp-attach <pid> | <process-name>", 2, 0, false));
695+
"_regexp-attach <pid> | <process-name>", 0, false));
698696
if (attach_regex_cmd_up) {
699697
if (attach_regex_cmd_up->AddRegexCommand("^([0-9]+)[[:space:]]*$",
700698
"process attach --pid %1") &&
@@ -716,7 +714,7 @@ void CommandInterpreter::LoadCommandDictionary() {
716714
"Select a newer stack frame. Defaults to "
717715
"moving one frame, a numeric argument can "
718716
"specify an arbitrary number.",
719-
"_regexp-down [<count>]", 2, 0, false));
717+
"_regexp-down [<count>]", 0, false));
720718
if (down_regex_cmd_up) {
721719
if (down_regex_cmd_up->AddRegexCommand("^$", "frame select -r -1") &&
722720
down_regex_cmd_up->AddRegexCommand("^([0-9]+)$",
@@ -732,7 +730,7 @@ void CommandInterpreter::LoadCommandDictionary() {
732730
*this, "_regexp-up",
733731
"Select an older stack frame. Defaults to moving one "
734732
"frame, a numeric argument can specify an arbitrary number.",
735-
"_regexp-up [<count>]", 2, 0, false));
733+
"_regexp-up [<count>]", 0, false));
736734
if (up_regex_cmd_up) {
737735
if (up_regex_cmd_up->AddRegexCommand("^$", "frame select -r 1") &&
738736
up_regex_cmd_up->AddRegexCommand("^([0-9]+)$", "frame select -r %1")) {
@@ -746,7 +744,7 @@ void CommandInterpreter::LoadCommandDictionary() {
746744
new CommandObjectRegexCommand(
747745
*this, "_regexp-display",
748746
"Evaluate an expression at every stop (see 'help target stop-hook'.)",
749-
"_regexp-display expression", 2, 0, false));
747+
"_regexp-display expression", 0, false));
750748
if (display_regex_cmd_up) {
751749
if (display_regex_cmd_up->AddRegexCommand(
752750
"^(.+)$", "target stop-hook add -o \"expr -- %1\"")) {
@@ -760,7 +758,7 @@ void CommandInterpreter::LoadCommandDictionary() {
760758
new CommandObjectRegexCommand(*this, "_regexp-undisplay",
761759
"Stop displaying expression at every "
762760
"stop (specified by stop-hook index.)",
763-
"_regexp-undisplay stop-hook-number", 2, 0,
761+
"_regexp-undisplay stop-hook-number", 0,
764762
false));
765763
if (undisplay_regex_cmd_up) {
766764
if (undisplay_regex_cmd_up->AddRegexCommand("^([0-9]+)$",
@@ -778,7 +776,7 @@ void CommandInterpreter::LoadCommandDictionary() {
778776
"If no host is specifed, localhost is assumed.\n"
779777
"gdb-remote is an abbreviation for 'process connect --plugin "
780778
"gdb-remote connect://<hostname>:<port>'\n",
781-
"gdb-remote [<hostname>:]<portnum>", 2, 0, false));
779+
"gdb-remote [<hostname>:]<portnum>", 0, false));
782780
if (connect_gdb_remote_cmd_up) {
783781
if (connect_gdb_remote_cmd_up->AddRegexCommand(
784782
"^([^:]+|\\[[0-9a-fA-F:]+.*\\]):([0-9]+)$",
@@ -798,7 +796,7 @@ void CommandInterpreter::LoadCommandDictionary() {
798796
"If no UDP port is specified, port 41139 is assumed.\n"
799797
"kdp-remote is an abbreviation for 'process connect --plugin "
800798
"kdp-remote udp://<hostname>:<port>'\n",
801-
"kdp-remote <hostname>[:<portnum>]", 2, 0, false));
799+
"kdp-remote <hostname>[:<portnum>]", 0, false));
802800
if (connect_kdp_remote_cmd_up) {
803801
if (connect_kdp_remote_cmd_up->AddRegexCommand(
804802
"^([^:]+:[[:digit:]]+)$",
@@ -818,7 +816,7 @@ void CommandInterpreter::LoadCommandDictionary() {
818816
"frames. The argument 'all' displays all threads. Use 'settings"
819817
" set frame-format' to customize the printing of individual frames "
820818
"and 'settings set thread-format' to customize the thread header.",
821-
"bt [<digit> | all]", 2, 0, false));
819+
"bt [<digit> | all]", 0, false));
822820
if (bt_regex_cmd_up) {
823821
// accept but don't document "bt -c <number>" -- before bt was a regex
824822
// command if you wanted to backtrace three frames you would do "bt -c 3"
@@ -847,7 +845,7 @@ void CommandInterpreter::LoadCommandDictionary() {
847845
"_regexp-list 0x<address> // List around specified address\n"
848846
"_regexp-list -[<count>] // List previous <count> lines\n"
849847
"_regexp-list // List subsequent lines",
850-
2, CommandCompletions::eSourceFileCompletion, false));
848+
CommandCompletions::eSourceFileCompletion, false));
851849
if (list_regex_cmd_up) {
852850
if (list_regex_cmd_up->AddRegexCommand("^([0-9]+)[[:space:]]*$",
853851
"source list --line %1") &&
@@ -879,7 +877,7 @@ void CommandInterpreter::LoadCommandDictionary() {
879877
"\n"
880878
"_regexp-env // Show environment\n"
881879
"_regexp-env <name>=<value> // Set an environment variable",
882-
2, 0, false));
880+
0, false));
883881
if (env_regex_cmd_up) {
884882
if (env_regex_cmd_up->AddRegexCommand("^$",
885883
"settings show target.env-vars") &&
@@ -899,7 +897,7 @@ void CommandInterpreter::LoadCommandDictionary() {
899897
"_regexp-jump +<line-offset> | -<line-offset>\n"
900898
"_regexp-jump <file>:<line>\n"
901899
"_regexp-jump *<addr>\n",
902-
2, 0, false));
900+
0, false));
903901
if (jump_regex_cmd_up) {
904902
if (jump_regex_cmd_up->AddRegexCommand("^\\*(.*)$",
905903
"thread jump --addr %1") &&

0 commit comments

Comments
 (0)