diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectCommands.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 10dc273..3049eb8 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... |