summaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2025-07-30 17:10:45 +0100
committerJessica Clarke <jrtc27@jrtc27.com>2025-07-30 17:10:45 +0100
commit3e93964b896023b1006d3c878effb68203d4d8dd (patch)
tree3f03bb1729e07cce41f0c46947ba94f877b97b41 /lldb/source/Commands/CommandObjectCommands.cpp
parent9da811368f7e9ab07bc9aa360eebca7f2ebcd53e (diff)
parent52ddcfd8d6c078b3e5ae3c230eea67a466d64f0f (diff)
Created using spr 1.3.5 [skip ci]
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 10dc273e39ab..3049eb8c20db 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -25,6 +25,7 @@
#include "lldb/Utility/Args.h"
#include "lldb/Utility/StringList.h"
#include "llvm/ADT/StringRef.h"
+#include <memory>
#include <optional>
using namespace lldb;
@@ -467,7 +468,7 @@ protected:
// Verify & handle any options/arguments passed to the alias command
OptionArgVectorSP option_arg_vector_sp =
- OptionArgVectorSP(new OptionArgVector);
+ std::make_shared<OptionArgVector>();
const bool include_aliases = true;
// Look up the command using command's name first. This is to resolve
@@ -543,7 +544,7 @@ protected:
CommandObject *cmd_obj = command_obj_sp.get();
CommandObject *sub_cmd_obj = nullptr;
OptionArgVectorSP option_arg_vector_sp =
- OptionArgVectorSP(new OptionArgVector);
+ std::make_shared<OptionArgVector>();
while (cmd_obj->IsMultiwordObject() && !args.empty()) {
auto sub_command = args[0].ref();
@@ -2504,9 +2505,9 @@ protected:
CommandObjectSP new_cmd_sp;
if (m_options.m_class_name.empty()) {
- new_cmd_sp.reset(new CommandObjectPythonFunction(
+ new_cmd_sp = std::make_shared<CommandObjectPythonFunction>(
m_interpreter, m_cmd_name, m_options.m_funct_name,
- m_options.m_short_help, m_synchronicity, m_completion_type));
+ m_options.m_short_help, m_synchronicity, m_completion_type);
} else {
ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
if (!interpreter) {
@@ -2528,9 +2529,9 @@ protected:
if (!result.Succeeded())
return;
} else
- new_cmd_sp.reset(new CommandObjectScriptingObjectRaw(
+ new_cmd_sp = std::make_shared<CommandObjectScriptingObjectRaw>(
m_interpreter, m_cmd_name, cmd_obj_sp, m_synchronicity,
- m_completion_type));
+ m_completion_type);
}
// Assume we're going to succeed...