diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -482,49 +482,46 @@ lldb::ScriptLanguage script_language = m_debugger.GetScriptLanguage(); - m_command_dict["apropos"] = CommandObjectSP(new CommandObjectApropos(*this)); + m_command_dict["apropos"] = std::make_shared(*this); m_command_dict["breakpoint"] = - CommandObjectSP(new CommandObjectMultiwordBreakpoint(*this)); + std::make_shared(*this); m_command_dict["command"] = - CommandObjectSP(new CommandObjectMultiwordCommands(*this)); + std::make_shared(*this); m_command_dict["disassemble"] = - CommandObjectSP(new CommandObjectDisassemble(*this)); + std::make_shared(*this); m_command_dict["expression"] = - CommandObjectSP(new CommandObjectExpression(*this)); + std::make_shared(*this); m_command_dict["frame"] = - CommandObjectSP(new CommandObjectMultiwordFrame(*this)); - m_command_dict["gui"] = CommandObjectSP(new CommandObjectGUI(*this)); - m_command_dict["help"] = CommandObjectSP(new CommandObjectHelp(*this)); - m_command_dict["log"] = CommandObjectSP(new CommandObjectLog(*this)); - m_command_dict["memory"] = CommandObjectSP(new CommandObjectMemory(*this)); - m_command_dict["platform"] = - CommandObjectSP(new CommandObjectPlatform(*this)); - m_command_dict["plugin"] = CommandObjectSP(new CommandObjectPlugin(*this)); + std::make_shared(*this); + m_command_dict["gui"] = std::make_shared(*this); + m_command_dict["help"] = std::make_shared(*this); + m_command_dict["log"] = std::make_shared(*this); + m_command_dict["memory"] = std::make_shared(*this); + m_command_dict["platform"] = std::make_shared(*this); + m_command_dict["plugin"] = std::make_shared(*this); m_command_dict["process"] = - CommandObjectSP(new CommandObjectMultiwordProcess(*this)); - m_command_dict["quit"] = CommandObjectSP(new CommandObjectQuit(*this)); - m_command_dict["register"] = - CommandObjectSP(new CommandObjectRegister(*this)); + std::make_shared(*this); + m_command_dict["quit"] = std::make_shared(*this); + m_command_dict["register"] = std::make_shared(*this); m_command_dict["reproducer"] = - CommandObjectSP(new CommandObjectReproducer(*this)); + std::make_shared(*this); m_command_dict["script"] = - CommandObjectSP(new CommandObjectScript(*this, script_language)); + std::make_shared(*this, script_language); m_command_dict["session"] = std::make_shared(*this); m_command_dict["settings"] = - CommandObjectSP(new CommandObjectMultiwordSettings(*this)); + std::make_shared(*this); m_command_dict["source"] = - CommandObjectSP(new CommandObjectMultiwordSource(*this)); - m_command_dict["statistics"] = CommandObjectSP(new CommandObjectStats(*this)); + std::make_shared(*this); + m_command_dict["statistics"] = std::make_shared(*this); m_command_dict["target"] = - CommandObjectSP(new CommandObjectMultiwordTarget(*this)); + std::make_shared(*this); m_command_dict["thread"] = - CommandObjectSP(new CommandObjectMultiwordThread(*this)); - m_command_dict["type"] = CommandObjectSP(new CommandObjectType(*this)); - m_command_dict["version"] = CommandObjectSP(new CommandObjectVersion(*this)); + std::make_shared(*this); + m_command_dict["type"] = std::make_shared(*this); + m_command_dict["version"] = std::make_shared(*this); m_command_dict["watchpoint"] = - CommandObjectSP(new CommandObjectMultiwordWatchpoint(*this)); - m_command_dict["language"] = - CommandObjectSP(new CommandObjectLanguage(*this)); + std::make_shared(*this); + m_command_dict["language"] = std::make_shared(*this); // clang-format off const char *break_regexes[][2] = {