Skip to content

Commit

Permalink
[lldb] Move ScriptCommand and RegexCommand under Commands (NFC)
Browse files Browse the repository at this point in the history
Move the CommandObjectScript and CommandObjectRegexCommand under
Commands where all the other CommandObject implementations live.

Although neither implementations currently use the TableGen-generated
CommandOptions.inc, this move would have been necessary anyway if they
were to in the future.
  • Loading branch information
JDevlieghere committed Sep 2, 2020
1 parent 2027669 commit 9390b34
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 15 deletions.
2 changes: 2 additions & 0 deletions lldb/source/Commands/CMakeLists.txt
Expand Up @@ -21,8 +21,10 @@ add_lldb_library(lldbCommands
CommandObjectPlugin.cpp
CommandObjectProcess.cpp
CommandObjectQuit.cpp
CommandObjectRegexCommand.cpp
CommandObjectRegister.cpp
CommandObjectReproducer.cpp
CommandObjectScript.cpp
CommandObjectSession.cpp
CommandObjectSettings.cpp
CommandObjectSource.cpp
Expand Down
5 changes: 2 additions & 3 deletions lldb/source/Commands/CommandObjectCommands.cpp
Expand Up @@ -6,15 +6,13 @@
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/StringRef.h"

#include "CommandObjectCommands.h"
#include "CommandObjectHelp.h"
#include "CommandObjectRegexCommand.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/IOHandler.h"
#include "lldb/Interpreter/CommandHistory.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandObjectRegexCommand.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Interpreter/OptionValueBoolean.h"
Expand All @@ -24,6 +22,7 @@
#include "lldb/Interpreter/ScriptInterpreter.h"
#include "lldb/Utility/Args.h"
#include "lldb/Utility/StringList.h"
#include "llvm/ADT/StringRef.h"

using namespace lldb;
using namespace lldb_private;
Expand Down
Expand Up @@ -6,8 +6,7 @@
//
//===----------------------------------------------------------------------===//

#include "lldb/Interpreter/CommandObjectRegexCommand.h"

#include "CommandObjectRegexCommand.h"
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"

Expand All @@ -17,7 +16,7 @@ using namespace lldb_private;
// CommandObjectRegexCommand constructor
CommandObjectRegexCommand::CommandObjectRegexCommand(
CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help,
llvm::StringRef syntax, uint32_t max_matches, uint32_t completion_type_mask,
llvm::StringRef syntax, uint32_t max_matches, uint32_t completion_type_mask,
bool is_removable)
: CommandObjectRaw(interpreter, name, help, syntax),
m_max_matches(max_matches), m_completion_type_mask(completion_type_mask),
Expand Down
Expand Up @@ -21,10 +21,10 @@ namespace lldb_private {

class CommandObjectRegexCommand : public CommandObjectRaw {
public:
CommandObjectRegexCommand(CommandInterpreter &interpreter, llvm::StringRef name,
llvm::StringRef help, llvm::StringRef syntax,
uint32_t max_matches, uint32_t completion_type_mask,
bool is_removable);
CommandObjectRegexCommand(CommandInterpreter &interpreter,
llvm::StringRef name, llvm::StringRef help,
llvm::StringRef syntax, uint32_t max_matches,
uint32_t completion_type_mask, bool is_removable);

~CommandObjectRegexCommand() override;

Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions lldb/source/Interpreter/CMakeLists.txt
Expand Up @@ -11,8 +11,6 @@ add_lldb_library(lldbInterpreter
CommandHistory.cpp
CommandInterpreter.cpp
CommandObject.cpp
CommandObjectRegexCommand.cpp
CommandObjectScript.cpp
CommandOptionValidators.cpp
CommandReturnObject.cpp
OptionArgParser.cpp
Expand Down
5 changes: 2 additions & 3 deletions lldb/source/Interpreter/CommandInterpreter.cpp
Expand Up @@ -12,9 +12,6 @@
#include <string>
#include <vector>

#include "CommandObjectScript.h"
#include "lldb/Interpreter/CommandObjectRegexCommand.h"

#include "Commands/CommandObjectApropos.h"
#include "Commands/CommandObjectBreakpoint.h"
#include "Commands/CommandObjectCommands.h"
Expand All @@ -30,8 +27,10 @@
#include "Commands/CommandObjectPlugin.h"
#include "Commands/CommandObjectProcess.h"
#include "Commands/CommandObjectQuit.h"
#include "Commands/CommandObjectRegexCommand.h"
#include "Commands/CommandObjectRegister.h"
#include "Commands/CommandObjectReproducer.h"
#include "Commands/CommandObjectScript.h"
#include "Commands/CommandObjectSession.h"
#include "Commands/CommandObjectSettings.h"
#include "Commands/CommandObjectSource.h"
Expand Down

0 comments on commit 9390b34

Please sign in to comment.