[Lldb-commits] [lldb] r353764 - Use std::make_shared in LLDB (NFC)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 11 15:13:09 PST 2019


Author: jdevlieghere
Date: Mon Feb 11 15:13:08 2019
New Revision: 353764

URL: http://llvm.org/viewvc/llvm-project?rev=353764&view=rev
Log:
Use std::make_shared in LLDB (NFC)

Unlike std::make_unique, which is only available since C++14,
std::make_shared is available since C++11. Not only is std::make_shared
a lot more readable compared to ::reset(new), it also performs a single
heap allocation for the object and control block.

Differential revision: https://reviews.llvm.org/D57990

Modified:
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBData.cpp
    lldb/trunk/source/API/SBInstruction.cpp
    lldb/trunk/source/API/SBThread.cpp
    lldb/trunk/source/API/SBThreadPlan.cpp
    lldb/trunk/source/API/SBTrace.cpp
    lldb/trunk/source/API/SBTraceOptions.cpp
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/API/SBTypeEnumMember.cpp
    lldb/trunk/source/API/SBValue.cpp
    lldb/trunk/source/Breakpoint/Breakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectFrame.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectType.cpp
    lldb/trunk/source/Core/IOHandler.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/DataFormatters/StringPrinter.cpp
    lldb/trunk/source/Expression/Materializer.cpp
    lldb/trunk/source/Expression/REPL.cpp
    lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp
    lldb/trunk/source/Interpreter/Property.cpp
    lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
    lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
    lldb/trunk/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
    lldb/trunk/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
    lldb/trunk/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
    lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
    lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp
    lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
    lldb/trunk/source/Plugins/Process/Utility/ThreadMemory.cpp
    lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
    lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
    lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
    lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
    lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
    lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
    lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp
    lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
    lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
    lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp
    lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
    lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
    lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
    lldb/trunk/source/Symbol/Block.cpp
    lldb/trunk/source/Symbol/ClangASTImporter.cpp
    lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
    lldb/trunk/source/Symbol/FuncUnwinders.cpp
    lldb/trunk/source/Target/CPPLanguageRuntime.cpp
    lldb/trunk/source/Target/Memory.cpp
    lldb/trunk/source/Target/Platform.cpp
    lldb/trunk/source/Target/Process.cpp
    lldb/trunk/source/Target/StackFrame.cpp
    lldb/trunk/source/Target/StackFrameList.cpp
    lldb/trunk/source/Target/Target.cpp
    lldb/trunk/source/Target/Thread.cpp
    lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
    lldb/trunk/source/Target/ThreadPlanStepOut.cpp
    lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
    lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp
    lldb/trunk/tools/debugserver/source/RNBRemote.cpp
    lldb/trunk/tools/debugserver/source/debugserver.cpp
    lldb/trunk/tools/debugserver/source/libdebugserver.cpp
    lldb/trunk/unittests/Editline/EditlineTest.cpp
    lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Mon Feb 11 15:13:08 2019
@@ -25,6 +25,8 @@
 #include "lldb/API/SBStringList.h"
 #include "lldb/API/SBTarget.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -555,8 +557,8 @@ lldb::SBCommand SBCommandInterpreter::Ad
 lldb::SBCommand SBCommandInterpreter::AddCommand(
     const char *name, lldb::SBCommandPluginInterface *impl, const char *help) {
   lldb::CommandObjectSP new_command_sp;
-  new_command_sp.reset(new CommandPluginInterfaceImplementation(
-      *m_opaque_ptr, name, impl, help));
+  new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>(
+      *m_opaque_ptr, name, impl, help);
 
   if (new_command_sp &&
       m_opaque_ptr->AddUserCommand(name, new_command_sp, true))
@@ -569,8 +571,8 @@ SBCommandInterpreter::AddCommand(const c
                                  lldb::SBCommandPluginInterface *impl,
                                  const char *help, const char *syntax) {
   lldb::CommandObjectSP new_command_sp;
-  new_command_sp.reset(new CommandPluginInterfaceImplementation(
-      *m_opaque_ptr, name, impl, help, syntax));
+  new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>(
+      *m_opaque_ptr, name, impl, help, syntax);
 
   if (new_command_sp &&
       m_opaque_ptr->AddUserCommand(name, new_command_sp, true))
@@ -631,8 +633,8 @@ lldb::SBCommand SBCommand::AddCommand(co
   if (!m_opaque_sp->IsMultiwordObject())
     return lldb::SBCommand();
   lldb::CommandObjectSP new_command_sp;
-  new_command_sp.reset(new CommandPluginInterfaceImplementation(
-      m_opaque_sp->GetCommandInterpreter(), name, impl, help));
+  new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>(
+      m_opaque_sp->GetCommandInterpreter(), name, impl, help);
   if (new_command_sp && m_opaque_sp->LoadSubCommand(name, new_command_sp))
     return lldb::SBCommand(new_command_sp);
   return lldb::SBCommand();
@@ -646,8 +648,8 @@ lldb::SBCommand SBCommand::AddCommand(co
   if (!m_opaque_sp->IsMultiwordObject())
     return lldb::SBCommand();
   lldb::CommandObjectSP new_command_sp;
-  new_command_sp.reset(new CommandPluginInterfaceImplementation(
-      m_opaque_sp->GetCommandInterpreter(), name, impl, help, syntax));
+  new_command_sp = std::make_shared<CommandPluginInterfaceImplementation>(
+      m_opaque_sp->GetCommandInterpreter(), name, impl, help, syntax);
   if (new_command_sp && m_opaque_sp->LoadSubCommand(name, new_command_sp))
     return lldb::SBCommand(new_command_sp);
   return lldb::SBCommand();

Modified: lldb/trunk/source/API/SBData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBData.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBData.cpp (original)
+++ lldb/trunk/source/API/SBData.cpp Mon Feb 11 15:13:08 2019
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <inttypes.h>
-
 #include "lldb/API/SBData.h"
 #include "lldb/API/SBError.h"
 #include "lldb/API/SBStream.h"
@@ -18,6 +16,9 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
+#include <cinttypes>
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -381,7 +382,7 @@ void SBData::SetData(lldb::SBError &erro
                      lldb::ByteOrder endian, uint8_t addr_size) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(new DataExtractor(buf, size, endian, addr_size));
+    m_opaque_sp = std::make_shared<DataExtractor>(buf, size, endian, addr_size);
   else
   {
     m_opaque_sp->SetData(buf, size, endian);
@@ -530,8 +531,8 @@ bool SBData::SetDataFromCString(const ch
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(data, data_len));
 
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(
-        new DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize()));
+    m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
+                                                  GetAddressByteSize());
   else
     m_opaque_sp->SetData(buffer_sp);
 
@@ -560,8 +561,8 @@ bool SBData::SetDataFromUInt64Array(uint
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
 
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(
-        new DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize()));
+    m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
+                                                  GetAddressByteSize());
   else
     m_opaque_sp->SetData(buffer_sp);
 
@@ -592,8 +593,8 @@ bool SBData::SetDataFromUInt32Array(uint
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
 
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(
-        new DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize()));
+    m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
+                                                  GetAddressByteSize());
   else
     m_opaque_sp->SetData(buffer_sp);
 
@@ -624,8 +625,8 @@ bool SBData::SetDataFromSInt64Array(int6
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
 
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(
-        new DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize()));
+    m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
+                                                  GetAddressByteSize());
   else
     m_opaque_sp->SetData(buffer_sp);
 
@@ -656,8 +657,8 @@ bool SBData::SetDataFromSInt32Array(int3
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
 
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(
-        new DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize()));
+    m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
+                                                  GetAddressByteSize());
   else
     m_opaque_sp->SetData(buffer_sp);
 
@@ -688,8 +689,8 @@ bool SBData::SetDataFromDoubleArray(doub
   lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len));
 
   if (!m_opaque_sp.get())
-    m_opaque_sp.reset(
-        new DataExtractor(buffer_sp, GetByteOrder(), GetAddressByteSize()));
+    m_opaque_sp = std::make_shared<DataExtractor>(buffer_sp, GetByteOrder(),
+                                                  GetAddressByteSize());
   else
     m_opaque_sp->SetData(buffer_sp);
 

Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Mon Feb 11 15:13:08 2019
@@ -10,6 +10,7 @@
 
 #include "lldb/API/SBAddress.h"
 #include "lldb/API/SBFrame.h"
+
 #include "lldb/API/SBInstruction.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBTarget.h"
@@ -25,6 +26,8 @@
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
 
+#include <memory>
+
 //----------------------------------------------------------------------
 // We recently fixed a leak in one of the Instruction subclasses where the
 // instruction will only hold a weak reference to the disassembler to avoid a
@@ -190,7 +193,7 @@ lldb::InstructionSP SBInstruction::GetOp
 
 void SBInstruction::SetOpaque(const lldb::DisassemblerSP &disasm_sp,
                               const lldb::InstructionSP &inst_sp) {
-  m_opaque_sp.reset(new InstructionImpl(disasm_sp, inst_sp));
+  m_opaque_sp = std::make_shared<InstructionImpl>(disasm_sp, inst_sp);
 }
 
 bool SBInstruction::GetDescription(lldb::SBStream &s) {

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Mon Feb 11 15:13:08 2019
@@ -44,6 +44,8 @@
 #include "lldb/API/SBValue.h"
 #include "lldb/lldb-enumerations.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -290,7 +292,7 @@ bool SBThread::GetStopReasonExtendedInfo
 SBThreadCollection
 SBThread::GetStopReasonExtendedBacktraces(InstrumentationRuntimeType type) {
   ThreadCollectionSP threads;
-  threads.reset(new ThreadCollection());
+  threads = std::make_shared<ThreadCollection>();
 
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);

Modified: lldb/trunk/source/API/SBThreadPlan.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThreadPlan.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThreadPlan.cpp (original)
+++ lldb/trunk/source/API/SBThreadPlan.cpp Mon Feb 11 15:13:08 2019
@@ -41,6 +41,8 @@
 #include "lldb/API/SBThreadPlan.h"
 #include "lldb/API/SBValue.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -58,7 +60,7 @@ SBThreadPlan::SBThreadPlan(const SBThrea
 SBThreadPlan::SBThreadPlan(lldb::SBThread &sb_thread, const char *class_name) {
   Thread *thread = sb_thread.get();
   if (thread)
-    m_opaque_sp.reset(new ThreadPlanPython(*thread, class_name));
+    m_opaque_sp = std::make_shared<ThreadPlanPython>(*thread, class_name);
 }
 
 //----------------------------------------------------------------------

Modified: lldb/trunk/source/API/SBTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTrace.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTrace.cpp (original)
+++ lldb/trunk/source/API/SBTrace.cpp Mon Feb 11 15:13:08 2019
@@ -12,6 +12,8 @@
 #include "lldb/API/SBTrace.h"
 #include "lldb/API/SBTraceOptions.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -92,7 +94,7 @@ void SBTrace::SetTraceUID(lldb::user_id_
 }
 
 SBTrace::SBTrace() {
-  m_trace_impl_sp.reset(new TraceImpl);
+  m_trace_impl_sp = std::make_shared<TraceImpl>();
   if (m_trace_impl_sp)
     m_trace_impl_sp->uid = LLDB_INVALID_UID;
 }

Modified: lldb/trunk/source/API/SBTraceOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTraceOptions.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTraceOptions.cpp (original)
+++ lldb/trunk/source/API/SBTraceOptions.cpp Mon Feb 11 15:13:08 2019
@@ -13,11 +13,13 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/TraceOptions.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
 SBTraceOptions::SBTraceOptions() {
-  m_traceoptions_sp.reset(new TraceOptions());
+  m_traceoptions_sp = std::make_shared<TraceOptions>();
 }
 
 lldb::TraceType SBTraceOptions::getType() const {

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Mon Feb 11 15:13:08 2019
@@ -20,6 +20,8 @@
 
 #include "llvm/ADT/APSInt.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -82,7 +84,7 @@ SBType::~SBType() {}
 
 TypeImpl &SBType::ref() {
   if (m_opaque_sp.get() == NULL)
-    m_opaque_sp.reset(new TypeImpl());
+    m_opaque_sp = std::make_shared<TypeImpl>();
   return *m_opaque_sp;
 }
 
@@ -670,7 +672,7 @@ void SBTypeMemberFunction::reset(TypeMem
 
 TypeMemberFunctionImpl &SBTypeMemberFunction::ref() {
   if (!m_opaque_sp)
-    m_opaque_sp.reset(new TypeMemberFunctionImpl());
+    m_opaque_sp = std::make_shared<TypeMemberFunctionImpl>();
   return *m_opaque_sp.get();
 }
 

Modified: lldb/trunk/source/API/SBTypeEnumMember.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeEnumMember.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeEnumMember.cpp (original)
+++ lldb/trunk/source/API/SBTypeEnumMember.cpp Mon Feb 11 15:13:08 2019
@@ -14,6 +14,8 @@
 #include "lldb/Symbol/Type.h"
 #include "lldb/Utility/Stream.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -28,14 +30,14 @@ SBTypeEnumMember::SBTypeEnumMember(const
     : m_opaque_sp() {
   if (this != &rhs) {
     if (rhs.IsValid())
-      m_opaque_sp.reset(new TypeEnumMemberImpl(rhs.ref()));
+      m_opaque_sp = std::make_shared<TypeEnumMemberImpl>(rhs.ref());
   }
 }
 
 SBTypeEnumMember &SBTypeEnumMember::operator=(const SBTypeEnumMember &rhs) {
   if (this != &rhs) {
     if (rhs.IsValid())
-      m_opaque_sp.reset(new TypeEnumMemberImpl(rhs.ref()));
+      m_opaque_sp = std::make_shared<TypeEnumMemberImpl>(rhs.ref());
   }
   return *this;
 }
@@ -74,7 +76,7 @@ void SBTypeEnumMember::reset(TypeEnumMem
 
 TypeEnumMemberImpl &SBTypeEnumMember::ref() {
   if (m_opaque_sp.get() == NULL)
-    m_opaque_sp.reset(new TypeEnumMemberImpl());
+    m_opaque_sp = std::make_shared<TypeEnumMemberImpl>();
   return *m_opaque_sp.get();
 }
 

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Mon Feb 11 15:13:08 2019
@@ -46,6 +46,8 @@
 #include "lldb/API/SBTarget.h"
 #include "lldb/API/SBThread.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -485,7 +487,7 @@ SBType SBValue::GetType() {
   lldb::ValueObjectSP value_sp(GetSP(locker));
   TypeImplSP type_sp;
   if (value_sp) {
-    type_sp.reset(new TypeImpl(value_sp->GetTypeImpl()));
+    type_sp = std::make_shared<TypeImpl>(value_sp->GetTypeImpl());
     sb_type.SetSP(type_sp);
   }
   if (log) {

Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original)
+++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Mon Feb 11 15:13:08 2019
@@ -29,6 +29,8 @@
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/StreamString.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm;
@@ -158,8 +160,8 @@ lldb::BreakpointSP Breakpoint::CreateFro
       SearchFilter::GetSerializationKey(), filter_dict);
   SearchFilterSP filter_sp;
   if (!success)
-    filter_sp.reset(
-        new SearchFilterForUnconstrainedSearches(target.shared_from_this()));
+    filter_sp = std::make_shared<SearchFilterForUnconstrainedSearches>(
+        target.shared_from_this());
   else {
     filter_sp = SearchFilter::CreateFromStructuredData(target, *filter_dict,
                                                        create_error);

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Mon Feb 11 15:13:08 2019
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <vector>
-
 #include "CommandObjectBreakpoint.h"
 #include "CommandObjectBreakpointCommand.h"
 #include "lldb/Breakpoint/Breakpoint.h"
@@ -30,6 +28,9 @@
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StreamString.h"
 
+#include <memory>
+#include <vector>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -615,7 +616,7 @@ public:
       m_move_to_nearest_code = eLazyBoolCalculate;
       m_source_regex_func_names.clear();
       m_python_class.clear();
-      m_extra_args_sp.reset(new StructuredData::Dictionary());
+      m_extra_args_sp = std::make_shared<StructuredData::Dictionary>();
       m_current_key.clear();
     }
 

Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Mon Feb 11 15:13:08 2019
@@ -5,9 +5,6 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-
-#include <string>
-
 #include "CommandObjectFrame.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
@@ -45,6 +42,9 @@
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/Timer.h"
 
+#include <memory>
+#include <string>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -526,9 +526,9 @@ protected:
           ConstString(m_option_variable.summary.GetCurrentValue()),
           summary_format_sp);
     else if (!m_option_variable.summary_string.IsCurrentValueEmpty())
-      summary_format_sp.reset(new StringSummaryFormat(
+      summary_format_sp = std::make_shared<StringSummaryFormat>(
           TypeSummaryImpl::Flags(),
-          m_option_variable.summary_string.GetCurrentValue()));
+          m_option_variable.summary_string.GetCurrentValue());
 
     DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions(
         eLanguageRuntimeDescriptionDisplayVerbosityFull, eFormatDefault,

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Mon Feb 11 15:13:08 2019
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <inttypes.h>
-
 #include "clang/AST/Decl.h"
 
 #include "CommandObjectMemory.h"
@@ -42,6 +40,9 @@
 
 #include "lldb/lldb-private.h"
 
+#include <cinttypes>
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -652,7 +653,7 @@ protected:
         addr = addr + (*size * m_memory_options.m_offset.GetCurrentValue());
     } else if (m_format_options.GetFormatValue().GetCurrentValue() !=
                eFormatCString) {
-      data_sp.reset(new DataBufferHeap(total_byte_size, '\0'));
+      data_sp = std::make_shared<DataBufferHeap>(total_byte_size, '\0');
       if (data_sp->GetBytes() == nullptr) {
         result.AppendErrorWithFormat(
             "can't allocate 0x%" PRIx32
@@ -692,8 +693,9 @@ protected:
         item_byte_size = target->GetMaximumSizeOfStringSummary();
       if (!m_format_options.GetCountValue().OptionWasSet())
         item_count = 1;
-      data_sp.reset(new DataBufferHeap((item_byte_size + 1) * item_count,
-                                       '\0')); // account for NULLs as necessary
+      data_sp = std::make_shared<DataBufferHeap>(
+          (item_byte_size + 1) * item_count,
+          '\0'); // account for NULLs as necessary
       if (data_sp->GetBytes() == nullptr) {
         result.AppendErrorWithFormat(
             "can't allocate 0x%" PRIx64
@@ -740,7 +742,8 @@ protected:
         if (break_on_no_NULL)
           break;
       }
-      data_sp.reset(new DataBufferHeap(data_sp->GetBytes(), bytes_read + 1));
+      data_sp =
+          std::make_shared<DataBufferHeap>(data_sp->GetBytes(), bytes_read + 1);
     }
 
     m_next_addr = addr + bytes_read;

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Mon Feb 11 15:13:08 2019
@@ -8,10 +8,6 @@
 
 #include "CommandObjectType.h"
 
-#include <algorithm>
-#include <cctype>
-#include <functional>
-
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/IOHandler.h"
 #include "lldb/DataFormatters/DataVisualization.h"
@@ -39,6 +35,11 @@
 
 #include "llvm/ADT/STLExtras.h"
 
+#include <algorithm>
+#include <cctype>
+#include <functional>
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -205,9 +206,9 @@ public:
                 // for every type in the list
 
                 TypeSummaryImplSP script_format;
-                script_format.reset(new ScriptSummaryFormat(
+                script_format = std::make_shared<ScriptSummaryFormat>(
                     options->m_flags, funct_name_str.c_str(),
-                    lines.CopyList("    ").c_str()));
+                    lines.CopyList("    ").c_str());
 
                 Status error;
 
@@ -449,12 +450,12 @@ protected:
                 // class
 
                 SyntheticChildrenSP synth_provider;
-                synth_provider.reset(new ScriptedSyntheticChildren(
+                synth_provider = std::make_shared<ScriptedSyntheticChildren>(
                     SyntheticChildren::Flags()
                         .SetCascades(options->m_cascade)
                         .SetSkipPointers(options->m_skip_pointers)
                         .SetSkipReferences(options->m_skip_references),
-                    class_name_str.c_str()));
+                    class_name_str.c_str());
 
                 lldb::TypeCategoryImplSP category;
                 DataVisualization::Categories::GetCategory(
@@ -699,18 +700,18 @@ protected:
     TypeFormatImplSP entry;
 
     if (m_command_options.m_custom_type_name.empty())
-      entry.reset(new TypeFormatImpl_Format(
+      entry = std::make_shared<TypeFormatImpl_Format>(
           format, TypeFormatImpl::Flags()
                       .SetCascades(m_command_options.m_cascade)
                       .SetSkipPointers(m_command_options.m_skip_pointers)
-                      .SetSkipReferences(m_command_options.m_skip_references)));
+                      .SetSkipReferences(m_command_options.m_skip_references));
     else
-      entry.reset(new TypeFormatImpl_EnumType(
+      entry = std::make_shared<TypeFormatImpl_EnumType>(
           ConstString(m_command_options.m_custom_type_name.c_str()),
           TypeFormatImpl::Flags()
               .SetCascades(m_command_options.m_cascade)
               .SetSkipPointers(m_command_options.m_skip_pointers)
-              .SetSkipReferences(m_command_options.m_skip_references)));
+              .SetSkipReferences(m_command_options.m_skip_references));
 
     // now I have a valid format, let's add it to every type
 
@@ -1352,8 +1353,8 @@ bool CommandObjectTypeSummaryAdd::Execut
     std::string code =
         ("    " + m_options.m_python_function + "(valobj,internal_dict)");
 
-    script_format.reset(
-        new ScriptSummaryFormat(m_options.m_flags, funct_name, code.c_str()));
+    script_format = std::make_shared<ScriptSummaryFormat>(
+        m_options.m_flags, funct_name, code.c_str());
 
     ScriptInterpreter *interpreter = m_interpreter.GetScriptInterpreter();
 
@@ -1389,8 +1390,8 @@ bool CommandObjectTypeSummaryAdd::Execut
 
     std::string code = "    " + m_options.m_python_script;
 
-    script_format.reset(new ScriptSummaryFormat(
-        m_options.m_flags, funct_name_str.c_str(), code.c_str()));
+    script_format = std::make_shared<ScriptSummaryFormat>(
+        m_options.m_flags, funct_name_str.c_str(), code.c_str());
   } else {
     // Use an IOHandler to grab Python code from the user
     ScriptAddOptions *options =

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Mon Feb 11 15:13:08 2019
@@ -995,16 +995,18 @@ public:
                            bool make_active) {
     WindowSP subwindow_sp;
     if (m_window) {
-      subwindow_sp.reset(new Window(
-          name, ::subwin(m_window, bounds.size.height, bounds.size.width,
+      subwindow_sp = std::make_shared<Window>(
+          name,
+          ::subwin(m_window, bounds.size.height, bounds.size.width,
                          bounds.origin.y, bounds.origin.x),
-          true));
+          true);
       subwindow_sp->m_is_subwin = true;
     } else {
-      subwindow_sp.reset(
-          new Window(name, ::newwin(bounds.size.height, bounds.size.width,
-                                    bounds.origin.y, bounds.origin.x),
-                     true));
+      subwindow_sp = std::make_shared<Window>(
+          name,
+          ::newwin(bounds.size.height, bounds.size.width, bounds.origin.y,
+                   bounds.origin.x),
+          true);
       subwindow_sp->m_is_subwin = false;
     }
     subwindow_sp->m_parent = this;
@@ -1881,7 +1883,7 @@ public:
 
   WindowSP &GetMainWindow() {
     if (!m_window_sp)
-      m_window_sp.reset(new Window("main", stdscr, false));
+      m_window_sp = std::make_shared<Window>("main", stdscr, false);
     return m_window_sp;
   }
 
@@ -2508,7 +2510,7 @@ public:
             return; // Children are already up to date
           if (!m_frame_delegate_sp) {
             // Always expand the thread item the first time we show it
-            m_frame_delegate_sp.reset(new FrameTreeDelegate());
+            m_frame_delegate_sp = std::make_shared<FrameTreeDelegate>();
           }
 
           m_stop_id = process_sp->GetStopID();
@@ -2600,7 +2602,8 @@ public:
         if (!m_thread_delegate_sp) {
           // Always expand the thread item the first time we show it
           // item.Expand();
-          m_thread_delegate_sp.reset(new ThreadTreeDelegate(m_debugger));
+          m_thread_delegate_sp =
+              std::make_shared<ThreadTreeDelegate>(m_debugger);
         }
 
         TreeItem t(&item, *m_thread_delegate_sp, false);

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Mon Feb 11 15:13:08 2019
@@ -87,7 +87,8 @@ enum { ePropertyEnableExternalLookup, eP
 } // namespace
 
 ModuleListProperties::ModuleListProperties() {
-  m_collection_sp.reset(new OptionValueProperties(ConstString("symbols")));
+  m_collection_sp =
+      std::make_shared<OptionValueProperties>(ConstString("symbols"));
   m_collection_sp->Initialize(g_properties);
 
   llvm::SmallString<128> path;
@@ -829,7 +830,7 @@ Status ModuleList::GetSharedModule(const
   if (module_sp)
     return error;
 
-  module_sp.reset(new Module(module_spec));
+  module_sp = std::make_shared<Module>(module_spec);
   // Make sure there are a module and an object file since we can specify a
   // valid file path with an architecture that might not be in that file. By
   // getting the object file we can guarantee that the architecture matches
@@ -871,7 +872,7 @@ Status ModuleList::GetSharedModule(const
 
       auto resolved_module_spec(module_spec);
       resolved_module_spec.GetFileSpec() = search_path_spec;
-      module_sp.reset(new Module(resolved_module_spec));
+      module_sp = std::make_shared<Module>(resolved_module_spec);
       if (module_sp->GetObjectFile()) {
         // If we get in here we got the correct arch, now we just need to
         // verify the UUID if one was given
@@ -970,7 +971,7 @@ Status ModuleList::GetSharedModule(const
     }
 
     if (!module_sp) {
-      module_sp.reset(new Module(platform_module_spec));
+      module_sp = std::make_shared<Module>(platform_module_spec);
       // Make sure there are a module and an object file since we can specify a
       // valid file path with an architecture that might not be in that file.
       // By getting the object file we can guarantee that the architecture

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Mon Feb 11 15:13:08 2019
@@ -928,7 +928,7 @@ bool ValueObject::SetData(DataExtractor
 
 static bool CopyStringDataToBufferSP(const StreamString &source,
                                      lldb::DataBufferSP &destination) {
-  destination.reset(new DataBufferHeap(source.GetSize() + 1, 0));
+  destination = std::make_shared<DataBufferHeap>(source.GetSize() + 1, 0);
   memcpy(destination->GetBytes(), source.GetString().data(), source.GetSize());
   return true;
 }
@@ -991,7 +991,7 @@ ValueObject::ReadPointedString(lldb::Dat
           CopyStringDataToBufferSP(s, buffer_sp);
           return {0, was_capped};
         }
-        buffer_sp.reset(new DataBufferHeap(cstr_len, 0));
+        buffer_sp = std::make_shared<DataBufferHeap>(cstr_len, 0);
         memcpy(buffer_sp->GetBytes(), cstr, cstr_len);
         return {cstr_len, was_capped};
       } else {
@@ -1168,7 +1168,7 @@ const char *ValueObject::GetValueAsCStri
     if (my_format != m_last_format || m_value_str.empty()) {
       m_last_format = my_format;
       if (!format_sp)
-        format_sp.reset(new TypeFormatImpl_Format(my_format));
+        format_sp = std::make_shared<TypeFormatImpl_Format>(my_format);
       if (GetValueAsCString(*format_sp.get(), m_value_str)) {
         if (!m_value_did_change && m_old_value_valid) {
           // The value was gotten successfully, so we consider the value as

Modified: lldb/trunk/source/DataFormatters/StringPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/StringPrinter.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/StringPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/StringPrinter.cpp Mon Feb 11 15:13:08 2019
@@ -20,6 +20,7 @@
 
 #include <ctype.h>
 #include <locale>
+#include <memory>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -306,7 +307,8 @@ static bool DumpUTFBufferToStream(
     llvm::UTF8 *utf8_data_end_ptr = nullptr;
 
     if (ConvertFunction) {
-      utf8_data_buffer_sp.reset(new DataBufferHeap(4 * bufferSPSize, 0));
+      utf8_data_buffer_sp =
+          std::make_shared<DataBufferHeap>(4 * bufferSPSize, 0);
       utf8_data_ptr = (llvm::UTF8 *)utf8_data_buffer_sp->GetBytes();
       utf8_data_end_ptr = utf8_data_ptr + utf8_data_buffer_sp->GetByteSize();
       ConvertFunction(&data_ptr, data_end_ptr, &utf8_data_ptr,

Modified: lldb/trunk/source/Expression/Materializer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/Materializer.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Expression/Materializer.cpp (original)
+++ lldb/trunk/source/Expression/Materializer.cpp Mon Feb 11 15:13:08 2019
@@ -23,6 +23,8 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 uint32_t Materializer::AddStructMember(Entity &entity) {
@@ -560,8 +562,8 @@ public:
 
         m_temporary_allocation_size = data.GetByteSize();
 
-        m_original_data.reset(
-            new DataBufferHeap(data.GetDataStart(), data.GetByteSize()));
+        m_original_data = std::make_shared<DataBufferHeap>(data.GetDataStart(),
+                                                           data.GetByteSize());
 
         if (!alloc_error.Success()) {
           err.SetErrorStringWithFormat(
@@ -1215,8 +1217,8 @@ public:
       return;
     }
 
-    m_register_contents.reset(new DataBufferHeap(register_data.GetDataStart(),
-                                                 register_data.GetByteSize()));
+    m_register_contents = std::make_shared<DataBufferHeap>(
+        register_data.GetDataStart(), register_data.GetByteSize());
 
     Status write_error;
 

Modified: lldb/trunk/source/Expression/REPL.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/REPL.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Expression/REPL.cpp (original)
+++ lldb/trunk/source/Expression/REPL.cpp Mon Feb 11 15:13:08 2019
@@ -19,6 +19,8 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/AnsiTerminal.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 REPL::REPL(LLVMCastKind kind, Target &target) : m_target(target), m_kind(kind) {
@@ -71,15 +73,15 @@ std::string REPL::GetSourcePath() {
 lldb::IOHandlerSP REPL::GetIOHandler() {
   if (!m_io_handler_sp) {
     Debugger &debugger = m_target.GetDebugger();
-    m_io_handler_sp.reset(
-        new IOHandlerEditline(debugger, IOHandler::Type::REPL,
+    m_io_handler_sp = std::make_shared<IOHandlerEditline>(
+        debugger, IOHandler::Type::REPL,
                               "lldb-repl", // Name of input reader for history
                               llvm::StringRef("> "), // prompt
                               llvm::StringRef(". "), // Continuation prompt
                               true,                  // Multi-line
                               true, // The REPL prompt is always colored
                               1,    // Line number
-                              *this));
+        *this);
 
     // Don't exit if CTRL+C is pressed
     static_cast<IOHandlerEditline *>(m_io_handler_sp.get())

Modified: lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/ConnectionFileDescriptorPosix.cpp Mon Feb 11 15:13:08 2019
@@ -31,6 +31,7 @@
 #include <unistd.h>
 #endif
 
+#include <memory>
 #include <sstream>
 
 #include "llvm/Support/Errno.h"
@@ -86,8 +87,8 @@ ConnectionFileDescriptor::ConnectionFile
 ConnectionFileDescriptor::ConnectionFileDescriptor(int fd, bool owns_fd)
     : Connection(), m_pipe(), m_mutex(), m_shutting_down(false),
       m_waiting_for_accept(false), m_child_processes_inherit(false) {
-  m_write_sp.reset(new File(fd, owns_fd));
-  m_read_sp.reset(new File(fd, false));
+  m_write_sp = std::make_shared<File>(fd, owns_fd);
+  m_read_sp = std::make_shared<File>(fd, false);
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION |
                                                   LIBLLDB_LOG_OBJECT));
@@ -221,8 +222,8 @@ ConnectionStatus ConnectionFileDescripto
             m_read_sp = std::move(tcp_socket);
             m_write_sp = m_read_sp;
           } else {
-            m_read_sp.reset(new File(fd, false));
-            m_write_sp.reset(new File(fd, false));
+            m_read_sp = std::make_shared<File>(fd, false);
+            m_write_sp = std::make_shared<File>(fd, false);
           }
           m_uri = *addr;
           return eConnectionStatusSuccess;
@@ -271,8 +272,8 @@ ConnectionStatus ConnectionFileDescripto
           ::fcntl(fd, F_SETFL, flags);
         }
       }
-      m_read_sp.reset(new File(fd, true));
-      m_write_sp.reset(new File(fd, false));
+      m_read_sp = std::make_shared<File>(fd, true);
+      m_write_sp = std::make_shared<File>(fd, false);
       return eConnectionStatusSuccess;
     }
 #endif

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Mon Feb 11 15:13:08 2019
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include <memory>
 #include <stdlib.h>
 #include <string>
 #include <vector>
@@ -366,7 +367,7 @@ void CommandInterpreter::Initialize() {
   if (cmd_obj_sp)
     AddAlias("image", cmd_obj_sp);
 
-  alias_arguments_vector_sp.reset(new OptionArgVector);
+  alias_arguments_vector_sp = std::make_shared<OptionArgVector>();
 
   cmd_obj_sp = GetCommandSPExact("expression", false);
   if (cmd_obj_sp) {
@@ -392,7 +393,7 @@ void CommandInterpreter::Initialize() {
 
   cmd_obj_sp = GetCommandSPExact("process launch", false);
   if (cmd_obj_sp) {
-    alias_arguments_vector_sp.reset(new OptionArgVector);
+    alias_arguments_vector_sp = std::make_shared<OptionArgVector>();
 #if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
     AddAlias("r", cmd_obj_sp, "--");
     AddAlias("run", cmd_obj_sp, "--");
@@ -2967,7 +2968,7 @@ CommandInterpreter::GetIOHandler(bool fo
       flags = eHandleCommandFlagEchoCommand | eHandleCommandFlagPrintResult;
     }
 
-    m_command_io_handler_sp.reset(new IOHandlerEditline(
+    m_command_io_handler_sp = std::make_shared<IOHandlerEditline>(
         m_debugger, IOHandler::Type::CommandInterpreter,
         m_debugger.GetInputFile(), m_debugger.GetOutputFile(),
         m_debugger.GetErrorFile(), flags, "lldb", m_debugger.GetPrompt(),
@@ -2975,7 +2976,7 @@ CommandInterpreter::GetIOHandler(bool fo
         false, // Don't enable multiple line input, just single line commands
         m_debugger.GetUseColor(),
         0, // Don't show line numbers
-        *this));
+        *this);
   }
   return m_command_io_handler_sp;
 }

Modified: lldb/trunk/source/Interpreter/Property.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/Property.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/Property.cpp (original)
+++ lldb/trunk/source/Interpreter/Property.cpp Mon Feb 11 15:13:08 2019
@@ -15,6 +15,8 @@
 #include "lldb/Interpreter/OptionValues.h"
 #include "lldb/Target/Language.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -29,18 +31,20 @@ Property::Property(const PropertyDefinit
     // "definition.default_uint_value" is not used
     // "definition.default_cstr_value" as a string value that represents the
     // default string value for the architecture/triple
-    m_value_sp.reset(new OptionValueArch(definition.default_cstr_value));
+    m_value_sp =
+        std::make_shared<OptionValueArch>(definition.default_cstr_value);
     break;
 
   case OptionValue::eTypeArgs:
     // "definition.default_uint_value" is always a OptionValue::Type
-    m_value_sp.reset(new OptionValueArgs());
+    m_value_sp = std::make_shared<OptionValueArgs>();
     break;
 
   case OptionValue::eTypeArray:
     // "definition.default_uint_value" is always a OptionValue::Type
-    m_value_sp.reset(new OptionValueArray(OptionValue::ConvertTypeToMask(
-        (OptionValue::Type)definition.default_uint_value)));
+    m_value_sp =
+        std::make_shared<OptionValueArray>(OptionValue::ConvertTypeToMask(
+            (OptionValue::Type)definition.default_uint_value));
     break;
 
   case OptionValue::eTypeBoolean:
@@ -49,11 +53,12 @@ Property::Property(const PropertyDefinit
     // "definition.default_cstr_value" as a string value that represents the
     // default value.
     if (definition.default_cstr_value)
-      m_value_sp.reset(new OptionValueBoolean(OptionArgParser::ToBoolean(
-          llvm::StringRef(definition.default_cstr_value), false, nullptr)));
+      m_value_sp =
+          std::make_shared<OptionValueBoolean>(OptionArgParser::ToBoolean(
+              llvm::StringRef(definition.default_cstr_value), false, nullptr));
     else
-      m_value_sp.reset(
-          new OptionValueBoolean(definition.default_uint_value != 0));
+      m_value_sp = std::make_shared<OptionValueBoolean>(
+          definition.default_uint_value != 0);
     break;
 
   case OptionValue::eTypeChar: {
@@ -64,8 +69,9 @@ Property::Property(const PropertyDefinit
   }
   case OptionValue::eTypeDictionary:
     // "definition.default_uint_value" is always a OptionValue::Type
-    m_value_sp.reset(new OptionValueDictionary(OptionValue::ConvertTypeToMask(
-        (OptionValue::Type)definition.default_uint_value)));
+    m_value_sp =
+        std::make_shared<OptionValueDictionary>(OptionValue::ConvertTypeToMask(
+            (OptionValue::Type)definition.default_uint_value));
     break;
 
   case OptionValue::eTypeEnum:
@@ -100,14 +106,14 @@ Property::Property(const PropertyDefinit
     FileSpec file_spec = FileSpec(definition.default_cstr_value);
     if (resolve)
       FileSystem::Instance().Resolve(file_spec);
-    m_value_sp.reset(new OptionValueFileSpec(file_spec, resolve));
+    m_value_sp = std::make_shared<OptionValueFileSpec>(file_spec, resolve);
     break;
   }
 
   case OptionValue::eTypeFileSpecList:
     // "definition.default_uint_value" is not used for a
     // OptionValue::eTypeFileSpecList
-    m_value_sp.reset(new OptionValueFileSpecList());
+    m_value_sp = std::make_shared<OptionValueFileSpecList>();
     break;
 
   case OptionValue::eTypeFormat:
@@ -122,7 +128,7 @@ Property::Property(const PropertyDefinit
                                   nullptr);
       else
         new_format = (Format)definition.default_uint_value;
-      m_value_sp.reset(new OptionValueFormat(new_format));
+      m_value_sp = std::make_shared<OptionValueFormat>(new_format);
     }
     break;
 
@@ -138,29 +144,30 @@ Property::Property(const PropertyDefinit
             llvm::StringRef(definition.default_cstr_value));
       else
         new_lang = (LanguageType)definition.default_uint_value;
-      m_value_sp.reset(new OptionValueLanguage(new_lang));
+      m_value_sp = std::make_shared<OptionValueLanguage>(new_lang);
     }
     break;
 
   case OptionValue::eTypeFormatEntity:
     // "definition.default_cstr_value" as a string value that represents the
     // default
-    m_value_sp.reset(
-        new OptionValueFormatEntity(definition.default_cstr_value));
+    m_value_sp = std::make_shared<OptionValueFormatEntity>(
+        definition.default_cstr_value);
     break;
 
   case OptionValue::eTypePathMap:
     // "definition.default_uint_value" tells us if notifications should occur
     // for path mappings
-    m_value_sp.reset(
-        new OptionValuePathMappings(definition.default_uint_value != 0));
+    m_value_sp = std::make_shared<OptionValuePathMappings>(
+        definition.default_uint_value != 0);
     break;
 
   case OptionValue::eTypeRegex:
     // "definition.default_uint_value" is used to the regular expression flags
     // "definition.default_cstr_value" the default regular expression value
     // value.
-    m_value_sp.reset(new OptionValueRegex(definition.default_cstr_value));
+    m_value_sp =
+        std::make_shared<OptionValueRegex>(definition.default_cstr_value);
     break;
 
   case OptionValue::eTypeSInt64:
@@ -168,10 +175,10 @@ Property::Property(const PropertyDefinit
     // "definition.default_cstr_value" is NULL, otherwise interpret
     // "definition.default_cstr_value" as a string value that represents the
     // default value.
-    m_value_sp.reset(new OptionValueSInt64(
+    m_value_sp = std::make_shared<OptionValueSInt64>(
         definition.default_cstr_value
             ? StringConvert::ToSInt64(definition.default_cstr_value)
-            : definition.default_uint_value));
+            : definition.default_uint_value);
     break;
 
   case OptionValue::eTypeUInt64:
@@ -179,10 +186,10 @@ Property::Property(const PropertyDefinit
     // "definition.default_cstr_value" is NULL, otherwise interpret
     // "definition.default_cstr_value" as a string value that represents the
     // default value.
-    m_value_sp.reset(new OptionValueUInt64(
+    m_value_sp = std::make_shared<OptionValueUInt64>(
         definition.default_cstr_value
             ? StringConvert::ToUInt64(definition.default_cstr_value)
-            : definition.default_uint_value));
+            : definition.default_uint_value);
     break;
 
   case OptionValue::eTypeUUID:
@@ -192,7 +199,7 @@ Property::Property(const PropertyDefinit
       UUID uuid;
       if (definition.default_cstr_value)
         uuid.SetFromStringRef(definition.default_cstr_value);
-      m_value_sp.reset(new OptionValueUUID(uuid));
+      m_value_sp = std::make_shared<OptionValueUUID>(uuid);
     }
     break;
 

Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Mon Feb 11 15:13:08 2019
@@ -31,6 +31,8 @@
 
 #include "DynamicLoaderDarwinKernel.h"
 
+#include <memory>
+
 //#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN
 #ifdef ENABLE_DEBUG_PRINTF
 #include <stdio.h>
@@ -87,7 +89,7 @@ public:
   }
 
   DynamicLoaderDarwinKernelProperties() : Properties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -112,7 +114,7 @@ typedef std::shared_ptr<DynamicLoaderDar
 static const DynamicLoaderDarwinKernelPropertiesSP &GetGlobalProperties() {
   static DynamicLoaderDarwinKernelPropertiesSP g_settings_sp;
   if (!g_settings_sp)
-    g_settings_sp.reset(new DynamicLoaderDarwinKernelProperties());
+    g_settings_sp = std::make_shared<DynamicLoaderDarwinKernelProperties>();
   return g_settings_sp;
 }
 
@@ -791,8 +793,8 @@ bool DynamicLoaderDarwinKernel::KextImag
       if (IsKernel()) {
         if (Symbols::DownloadObjectAndSymbolFile(module_spec, true)) {
           if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
-            m_module_sp.reset(new Module(module_spec.GetFileSpec(),
-                                         target.GetArchitecture()));
+            m_module_sp = std::make_shared<Module>(module_spec.GetFileSpec(),
+                                                   target.GetArchitecture());
             if (m_module_sp.get() &&
                 m_module_sp->MatchesModuleSpec(module_spec)) {
               ModuleList loaded_module_list;

Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp Mon Feb 11 15:13:08 2019
@@ -20,6 +20,8 @@
 
 #include "DynamicLoaderHexagonDYLD.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -454,7 +456,8 @@ DynamicLoaderHexagonDYLD::GetStepThrough
 
     llvm::sort(start, end);
     addrs.erase(std::unique(start, end), end);
-    thread_plan_sp.reset(new ThreadPlanRunToAddress(thread, addrs, stop));
+    thread_plan_sp =
+        std::make_shared<ThreadPlanRunToAddress>(thread, addrs, stop);
   }
 
   return thread_plan_sp;

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp Mon Feb 11 15:13:08 2019
@@ -46,6 +46,8 @@
 #include <uuid/uuid.h>
 #endif
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -939,8 +941,8 @@ DynamicLoaderDarwin::GetStepThroughTramp
           load_addrs.push_back(address.GetLoadAddress(target_sp.get()));
         }
       }
-      thread_plan_sp.reset(
-          new ThreadPlanRunToAddress(thread, load_addrs, stop_others));
+      thread_plan_sp = std::make_shared<ThreadPlanRunToAddress>(
+          thread, load_addrs, stop_others);
     }
   } else {
     if (log)

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Mon Feb 11 15:13:08 2019
@@ -26,6 +26,7 @@
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Utility/Log.h"
 
+#include <memory>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -497,7 +498,8 @@ DynamicLoaderPOSIXDYLD::GetStepThroughTr
 
     llvm::sort(start, end);
     addrs.erase(std::unique(start, end), end);
-    thread_plan_sp.reset(new ThreadPlanRunToAddress(thread, addrs, stop));
+    thread_plan_sp =
+        std::make_shared<ThreadPlanRunToAddress>(thread, addrs, stop);
   }
 
   return thread_plan_sp;

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Mon Feb 11 15:13:08 2019
@@ -26,6 +26,7 @@
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/RecordLayout.h"
 
+#include <memory>
 #include <vector>
 
 using namespace clang;
@@ -707,7 +708,7 @@ void ClangASTSource::FindExternalVisible
     return; // otherwise we may need to fall back
   }
 
-  context.m_namespace_map.reset(new ClangASTImporter::NamespaceMap);
+  context.m_namespace_map = std::make_shared<ClangASTImporter::NamespaceMap>();
 
   if (const NamespaceDecl *namespace_context =
           dyn_cast<NamespaceDecl>(context.m_decl_context)) {

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Mon Feb 11 15:13:08 2019
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <cctype>
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTDiagnostic.h"
 #include "clang/AST/ExternalASTSource.h"
@@ -89,6 +88,9 @@
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StringList.h"
 
+#include <cctype>
+#include <memory>
+
 using namespace clang;
 using namespace llvm;
 using namespace lldb_private;
@@ -1104,11 +1106,11 @@ lldb_private::Status ClangExpressionPars
     custom_passes.EarlyPasses->run(*llvm_module_ap);
   }
 
-  execution_unit_sp.reset(
-      new IRExecutionUnit(m_llvm_context, // handed off here
+  execution_unit_sp = std::make_shared<IRExecutionUnit>(
+      m_llvm_context, // handed off here
                           llvm_module_ap, // handed off here
                           function_name, exe_ctx.GetTargetSP(), sc,
-                          m_compiler->getTargetOpts().Features));
+      m_compiler->getTargetOpts().Features);
 
   ClangExpressionHelper *type_system_helper =
       dyn_cast<ClangExpressionHelper>(m_expr.GetTypeSystemHelper());

Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp Mon Feb 11 15:13:08 2019
@@ -24,6 +24,8 @@
 #include "lldb/Utility/RegularExpression.h"
 #include "Plugins/Process/Utility/HistoryThread.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -238,7 +240,7 @@ lldb::ThreadCollectionSP
 MainThreadCheckerRuntime::GetBacktracesFromExtendedStopInfo(
     StructuredData::ObjectSP info) {
   ThreadCollectionSP threads;
-  threads.reset(new ThreadCollection());
+  threads = std::make_shared<ThreadCollection>();
   
   ProcessSP process_sp = GetProcessSP();
   

Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp Mon Feb 11 15:13:08 2019
@@ -30,6 +30,8 @@
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Stream.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -1050,7 +1052,7 @@ lldb::ThreadCollectionSP
 ThreadSanitizerRuntime::GetBacktracesFromExtendedStopInfo(
     StructuredData::ObjectSP info) {
   ThreadCollectionSP threads;
-  threads.reset(new ThreadCollection());
+  threads = std::make_shared<ThreadCollection>();
 
   if (info->GetObjectForDotSeparatedPath("instrumentation_class")
           ->GetStringValue() != "ThreadSanitizer")

Modified: lldb/trunk/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp Mon Feb 11 15:13:08 2019
@@ -31,6 +31,8 @@
 #include "lldb/Utility/Stream.h"
 #include <ctype.h>
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -303,7 +305,7 @@ lldb::ThreadCollectionSP
 UndefinedBehaviorSanitizerRuntime::GetBacktracesFromExtendedStopInfo(
     StructuredData::ObjectSP info) {
   ThreadCollectionSP threads;
-  threads.reset(new ThreadCollection());
+  threads = std::make_shared<ThreadCollection>();
 
   ProcessSP process_sp = GetProcessSP();
 

Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp (original)
+++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp Mon Feb 11 15:13:08 2019
@@ -29,6 +29,8 @@
 
 #include "JITLoaderGDB.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -70,7 +72,7 @@ public:
   }
 
   PluginProperties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -402,7 +404,7 @@ JITLoaderSP JITLoaderGDB::CreateInstance
   JITLoaderSP jit_loader_sp;
   ArchSpec arch(process->GetTarget().GetArchitecture());
   if (arch.GetTriple().getVendor() != llvm::Triple::Apple)
-    jit_loader_sp.reset(new JITLoaderGDB(process));
+    jit_loader_sp = std::make_shared<JITLoaderGDB>(process);
   return jit_loader_sp;
 }
 

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp Mon Feb 11 15:13:08 2019
@@ -31,6 +31,7 @@
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamString.h"
 
+#include <memory>
 #include <vector>
 
 using namespace lldb;
@@ -111,10 +112,10 @@ AppleObjCRuntimeV1::CreateExceptionResol
   BreakpointResolverSP resolver_sp;
 
   if (throw_bp)
-    resolver_sp.reset(new BreakpointResolverName(
+    resolver_sp = std::make_shared<BreakpointResolverName>(
         bkpt, std::get<1>(GetExceptionThrowLocation()).AsCString(),
         eFunctionNameTypeBase, eLanguageTypeUnknown, Breakpoint::Exact, 0,
-        eLazyBoolNo));
+        eLazyBoolNo);
   // FIXME: don't do catch yet.
   return resolver_sp;
 }

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Mon Feb 11 15:13:08 2019
@@ -8,6 +8,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 #include <vector>
 
@@ -803,10 +804,10 @@ AppleObjCRuntimeV2::CreateExceptionResol
   BreakpointResolverSP resolver_sp;
 
   if (throw_bp)
-    resolver_sp.reset(new BreakpointResolverName(
+    resolver_sp = std::make_shared<BreakpointResolverName>(
         bkpt, std::get<1>(GetExceptionThrowLocation()).AsCString(),
         eFunctionNameTypeBase, eLanguageTypeUnknown, Breakpoint::Exact, 0,
-        eLazyBoolNo));
+        eLazyBoolNo);
   // FIXME: We don't do catch breakpoints for ObjC yet.
   // Should there be some way for the runtime to specify what it can do in this
   // regard?
@@ -2549,7 +2550,8 @@ bool AppleObjCRuntimeV2::NonPointerISACa
 
 ObjCLanguageRuntime::EncodingToTypeSP AppleObjCRuntimeV2::GetEncodingToType() {
   if (!m_encoding_to_type_sp)
-    m_encoding_to_type_sp.reset(new AppleObjCTypeEncodingParser(*this));
+    m_encoding_to_type_sp =
+        std::make_shared<AppleObjCTypeEncodingParser>(*this);
   return m_encoding_to_type_sp;
 }
 

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp Mon Feb 11 15:13:08 2019
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "AppleObjCTrampolineHandler.h"
-
 #include "AppleThreadPlanStepThroughObjCTrampoline.h"
 
 #include "lldb/Breakpoint/StoppointCallbackContext.h"
@@ -36,6 +35,8 @@
 
 #include "llvm/ADT/STLExtras.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -1048,8 +1049,8 @@ AppleObjCTrampolineHandler::GetStepThrou
         log->Printf("Found implementation address in cache: 0x%" PRIx64,
                     impl_addr);
 
-      ret_plan_sp.reset(
-          new ThreadPlanRunToAddress(thread, impl_addr, stop_others));
+      ret_plan_sp = std::make_shared<ThreadPlanRunToAddress>(thread, impl_addr,
+                                                             stop_others);
     } else {
       // We haven't seen this class/selector pair yet.  Look it up.
       StreamString errors;
@@ -1128,9 +1129,9 @@ AppleObjCTrampolineHandler::GetStepThrou
       // is not safe to run only one thread.  So we override the
       // stop_others value passed in to us here:
       const bool trampoline_stop_others = false;
-      ret_plan_sp.reset(new AppleThreadPlanStepThroughObjCTrampoline(
+      ret_plan_sp = std::make_shared<AppleThreadPlanStepThroughObjCTrampoline>(
           thread, this, dispatch_values, isa_addr, sel_addr,
-          trampoline_stop_others));
+          trampoline_stop_others);
       if (log) {
         StreamString s;
         ret_plan_sp->GetDescription(&s, eDescriptionLevelFull);

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp Mon Feb 11 15:13:08 2019
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "AppleThreadPlanStepThroughObjCTrampoline.h"
+
 #include "AppleObjCTrampolineHandler.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/FunctionCaller.h"
@@ -20,6 +21,8 @@
 #include "lldb/Target/ThreadPlanStepOut.h"
 #include "lldb/Utility/Log.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -183,8 +186,8 @@ bool AppleThreadPlanStepThroughObjCTramp
 
     // Extract the target address from the value:
 
-    m_run_to_sp.reset(
-        new ThreadPlanRunToAddress(m_thread, target_so_addr, m_stop_others));
+    m_run_to_sp = std::make_shared<ThreadPlanRunToAddress>(
+        m_thread, target_so_addr, m_stop_others);
     m_thread.QueueThreadPlan(m_run_to_sp, false);
     m_run_to_sp->SetPrivate(true);
     return false;

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Mon Feb 11 15:13:08 2019
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/ADT/StringSwitch.h"
-
 #include "RenderScriptRuntime.h"
 #include "RenderScriptScriptGroup.h"
 
@@ -40,6 +38,10 @@
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Status.h"
 
+#include "llvm/ADT/StringSwitch.h"
+
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_renderscript;
@@ -1211,7 +1213,7 @@ void RenderScriptRuntime::CaptureDebugHi
       }
     }
     if (!group) {
-      group.reset(new RSScriptGroupDescriptor);
+      group = std::make_shared<RSScriptGroupDescriptor>();
       group->m_name = group_name;
       m_scriptGroups.push_back(group);
     } else {
@@ -2854,7 +2856,7 @@ bool RenderScriptRuntime::LoadModule(con
     switch (GetModuleKind(module_sp)) {
     case eModuleKindKernelObj: {
       RSModuleDescriptorSP module_desc;
-      module_desc.reset(new RSModuleDescriptor(module_sp));
+      module_desc = std::make_shared<RSModuleDescriptor>(module_sp);
       if (module_desc->ParseRSInfo()) {
         m_rsmodules.push_back(module_desc);
         module_desc->WarnIfVersionMismatch(GetProcess()

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Mon Feb 11 15:13:08 2019
@@ -59,6 +59,8 @@
 #include <uuid/uuid.h>
 #endif
 
+#include <memory>
+
 #define THUMB_ADDRESS_BIT_MASK 0xfffffffffffffffeull
 using namespace lldb;
 using namespace lldb_private;
@@ -1645,7 +1647,7 @@ void ObjectFileMachO::ProcessSegmentComm
   // conflict with any of the sections.
   SectionSP segment_sp;
   if (add_section && (const_segname || is_core)) {
-    segment_sp.reset(new Section(
+    segment_sp = std::make_shared<Section>(
         module_sp, // Module to which this section belongs
         this,      // Object file to which this sections belongs
         ++context.NextSegmentIdx
@@ -1663,7 +1665,7 @@ void ObjectFileMachO::ProcessSegmentComm
         load_cmd.filesize, // Size in bytes of this section as found
         // in the file
         0,                // Segments have no alignment information
-        load_cmd.flags)); // Flags for this section
+        load_cmd.flags); // Flags for this section
 
     segment_sp->SetIsEncrypted(segment_is_encrypted);
     m_sections_ap->AddSection(segment_sp);
@@ -1784,7 +1786,7 @@ void ObjectFileMachO::ProcessSegmentComm
           }
         } else {
           // Create a fake section for the section's named segment
-          segment_sp.reset(new Section(
+          segment_sp = std::make_shared<Section>(
               segment_sp, // Parent section
               module_sp,  // Module to which this section belongs
               this,       // Object file to which this section belongs
@@ -1805,7 +1807,7 @@ void ObjectFileMachO::ProcessSegmentComm
               // this section as
               // found in the file
               sect64.align,
-              load_cmd.flags)); // Flags for this section
+              load_cmd.flags); // Flags for this section
           segment_sp->SetIsFake(true);
           segment_sp->SetPermissions(segment_permissions);
           m_sections_ap->AddSection(segment_sp);
@@ -5525,19 +5527,23 @@ ObjectFileMachO::GetThreadContextAtIndex
 
       switch (m_header.cputype) {
       case llvm::MachO::CPU_TYPE_ARM64:
-        reg_ctx_sp.reset(new RegisterContextDarwin_arm64_Mach(thread, data));
+        reg_ctx_sp =
+            std::make_shared<RegisterContextDarwin_arm64_Mach>(thread, data);
         break;
 
       case llvm::MachO::CPU_TYPE_ARM:
-        reg_ctx_sp.reset(new RegisterContextDarwin_arm_Mach(thread, data));
+        reg_ctx_sp =
+            std::make_shared<RegisterContextDarwin_arm_Mach>(thread, data);
         break;
 
       case llvm::MachO::CPU_TYPE_I386:
-        reg_ctx_sp.reset(new RegisterContextDarwin_i386_Mach(thread, data));
+        reg_ctx_sp =
+            std::make_shared<RegisterContextDarwin_i386_Mach>(thread, data);
         break;
 
       case llvm::MachO::CPU_TYPE_X86_64:
-        reg_ctx_sp.reset(new RegisterContextDarwin_x86_64_Mach(thread, data));
+        reg_ctx_sp =
+            std::make_shared<RegisterContextDarwin_x86_64_Mach>(thread, data);
         break;
       }
     }

Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Mon Feb 11 15:13:08 2019
@@ -9,6 +9,7 @@
 #ifndef LLDB_DISABLE_PYTHON
 
 #include "OperatingSystemPython.h"
+
 #include "Plugins/Process/Utility/DynamicRegisterInfo.h"
 #include "Plugins/Process/Utility/RegisterContextDummy.h"
 #include "Plugins/Process/Utility/RegisterContextMemory.h"
@@ -31,6 +32,8 @@
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StructuredData.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -259,8 +262,8 @@ ThreadSP OperatingSystemPython::CreateTh
   if (!thread_sp) {
     if (did_create_ptr)
       *did_create_ptr = true;
-    thread_sp.reset(
-        new ThreadMemory(*m_process, tid, name, queue, reg_data_addr));
+    thread_sp = std::make_shared<ThreadMemory>(*m_process, tid, name, queue,
+                                               reg_data_addr);
   }
 
   if (core_number < core_thread_list.GetSize(false)) {
@@ -321,8 +324,8 @@ OperatingSystemPython::CreateRegisterCon
                   "= 0x%" PRIx64 ", 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64
                   ") creating memory register context",
                   thread->GetID(), thread->GetProtocolID(), reg_data_addr);
-    reg_ctx_sp.reset(new RegisterContextMemory(
-        *thread, 0, *GetDynamicRegisterInfo(), reg_data_addr));
+    reg_ctx_sp = std::make_shared<RegisterContextMemory>(
+        *thread, 0, *GetDynamicRegisterInfo(), reg_data_addr);
   } else {
     // No register data address is provided, query the python plug-in to let it
     // make up the data as it sees fit
@@ -355,8 +358,8 @@ OperatingSystemPython::CreateRegisterCon
       log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid "
                   "= 0x%" PRIx64 ") forcing a dummy register context",
                   thread->GetID());
-    reg_ctx_sp.reset(new RegisterContextDummy(
-        *thread, 0, target.GetArchitecture().GetAddressByteSize()));
+    reg_ctx_sp = std::make_shared<RegisterContextDummy>(
+        *thread, 0, target.GetArchitecture().GetAddressByteSize());
   }
   return reg_ctx_sp;
 }

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Mon Feb 11 15:13:08 2019
@@ -11,6 +11,7 @@
 #include <string.h>
 
 #include <algorithm>
+#include <memory>
 #include <mutex>
 
 #include "lldb/Breakpoint/BreakpointLocation.h"
@@ -262,7 +263,7 @@ lldb_private::Status PlatformDarwin::Get
                         module_spec.GetFileSpec().GetFilename().AsCString());
           ModuleSpec local_spec(module_cache_spec,
                                 module_spec.GetArchitecture());
-          module_sp.reset(new Module(local_spec));
+          module_sp = std::make_shared<Module>(local_spec);
           module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
           return Status();
         }
@@ -300,7 +301,7 @@ lldb_private::Status PlatformDarwin::Get
         }
 
         ModuleSpec local_spec(module_cache_spec, module_spec.GetArchitecture());
-        module_sp.reset(new Module(local_spec));
+        module_sp = std::make_shared<Module>(local_spec);
         module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
         Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
         if (log)
@@ -328,7 +329,7 @@ lldb_private::Status PlatformDarwin::Get
                       module_spec.GetFileSpec().GetDirectory().AsCString(),
                       module_spec.GetFileSpec().GetFilename().AsCString());
         ModuleSpec local_spec(module_cache_spec, module_spec.GetArchitecture());
-        module_sp.reset(new Module(local_spec));
+        module_sp = std::make_shared<Module>(local_spec);
         module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
         return Status();
       } else

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Mon Feb 11 15:13:08 2019
@@ -35,6 +35,8 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 
+#include <memory>
+
 #include "Host/macosx/cfcpp/CFCBundle.h"
 
 using namespace lldb;
@@ -200,7 +202,7 @@ public:
   }
 
   PlatformDarwinKernelProperties() : Properties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -228,7 +230,7 @@ typedef std::shared_ptr<PlatformDarwinKe
 static const PlatformDarwinKernelPropertiesSP &GetGlobalProperties() {
   static PlatformDarwinKernelPropertiesSP g_settings_sp;
   if (!g_settings_sp)
-    g_settings_sp.reset(new PlatformDarwinKernelProperties());
+    g_settings_sp = std::make_shared<PlatformDarwinKernelProperties>();
   return g_settings_sp;
 }
 

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Mon Feb 11 15:13:08 2019
@@ -9,6 +9,7 @@
 #include <errno.h>
 #include <stdlib.h>
 
+#include <memory>
 #include <mutex>
 
 #include "lldb/Core/Debugger.h"
@@ -63,7 +64,7 @@ public:
   }
 
   PluginProperties() : Properties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -81,7 +82,7 @@ typedef std::shared_ptr<PluginProperties
 static const ProcessKDPPropertiesSP &GetGlobalPluginProperties() {
   static ProcessKDPPropertiesSP g_settings_sp;
   if (!g_settings_sp)
-    g_settings_sp.reset(new PluginProperties());
+    g_settings_sp = std::make_shared<PluginProperties>();
   return g_settings_sp;
 }
 
@@ -108,7 +109,7 @@ lldb::ProcessSP ProcessKDP::CreateInstan
                                            const FileSpec *crash_file_path) {
   lldb::ProcessSP process_sp;
   if (crash_file_path == NULL)
-    process_sp.reset(new ProcessKDP(target_sp, listener_sp));
+    process_sp = std::make_shared<ProcessKDP>(target_sp, listener_sp);
   return process_sp;
 }
 
@@ -505,7 +506,7 @@ lldb::ThreadSP ProcessKDP::GetKernelThre
 
   ThreadSP thread_sp(m_kernel_thread_wp.lock());
   if (!thread_sp) {
-    thread_sp.reset(new ThreadKDP(*this, g_kernel_tid));
+    thread_sp = std::make_shared<ThreadKDP>(*this, g_kernel_tid);
     m_kernel_thread_wp = thread_sp;
   }
   return thread_sp;
@@ -1030,7 +1031,7 @@ public:
 
 CommandObject *ProcessKDP::GetPluginCommandObject() {
   if (!m_command_sp)
-    m_command_sp.reset(new CommandObjectMultiwordProcessKDP(
-        GetTarget().GetDebugger().GetCommandInterpreter()));
+    m_command_sp = std::make_shared<CommandObjectMultiwordProcessKDP>(
+        GetTarget().GetDebugger().GetCommandInterpreter());
   return m_command_sp.get();
 }

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp Mon Feb 11 15:13:08 2019
@@ -29,6 +29,8 @@
 #include "RegisterContextKDP_i386.h"
 #include "RegisterContextKDP_x86_64.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -98,19 +100,20 @@ ThreadKDP::CreateRegisterContextForFrame
                   ->GetCommunication()
                   .GetCPUType()) {
       case llvm::MachO::CPU_TYPE_ARM:
-        reg_ctx_sp.reset(new RegisterContextKDP_arm(*this, concrete_frame_idx));
+        reg_ctx_sp =
+            std::make_shared<RegisterContextKDP_arm>(*this, concrete_frame_idx);
         break;
       case llvm::MachO::CPU_TYPE_ARM64:
-        reg_ctx_sp.reset(
-            new RegisterContextKDP_arm64(*this, concrete_frame_idx));
+        reg_ctx_sp = std::make_shared<RegisterContextKDP_arm64>(
+            *this, concrete_frame_idx);
         break;
       case llvm::MachO::CPU_TYPE_I386:
-        reg_ctx_sp.reset(
-            new RegisterContextKDP_i386(*this, concrete_frame_idx));
+        reg_ctx_sp = std::make_shared<RegisterContextKDP_i386>(
+            *this, concrete_frame_idx);
         break;
       case llvm::MachO::CPU_TYPE_X86_64:
-        reg_ctx_sp.reset(
-            new RegisterContextKDP_x86_64(*this, concrete_frame_idx));
+        reg_ctx_sp = std::make_shared<RegisterContextKDP_x86_64>(
+            *this, concrete_frame_idx);
         break;
       default:
         llvm_unreachable("Add CPU type support in KDP");

Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.cpp Mon Feb 11 15:13:08 2019
@@ -9,6 +9,7 @@
 #include "lldb/lldb-private.h"
 
 #include "Plugins/Process/Utility/HistoryThread.h"
+
 #include "Plugins/Process/Utility/HistoryUnwind.h"
 #include "Plugins/Process/Utility/RegisterContextHistory.h"
 
@@ -16,6 +17,8 @@
 #include "lldb/Target/StackFrameList.h"
 #include "lldb/Utility/Log.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -48,8 +51,8 @@ HistoryThread::~HistoryThread() {
 lldb::RegisterContextSP HistoryThread::GetRegisterContext() {
   RegisterContextSP rctx;
   if (m_pcs.size() > 0) {
-    rctx.reset(new RegisterContextHistory(
-        *this, 0, GetProcess()->GetAddressByteSize(), m_pcs[0]));
+    rctx = std::make_shared<RegisterContextHistory>(
+        *this, 0, GetProcess()->GetAddressByteSize(), m_pcs[0]);
   }
   return rctx;
 }
@@ -64,7 +67,8 @@ lldb::StackFrameListSP HistoryThread::Ge
   std::unique_lock<std::mutex> lock(m_framelist_mutex);
   lock.unlock();
   if (m_framelist.get() == NULL) {
-    m_framelist.reset(new StackFrameList(*this, StackFrameListSP(), true));
+    m_framelist =
+        std::make_shared<StackFrameList>(*this, StackFrameListSP(), true);
   }
 
   return m_framelist;

Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.cpp Mon Feb 11 15:13:08 2019
@@ -16,6 +16,8 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -42,9 +44,9 @@ HistoryUnwind::DoCreateRegisterContextFo
     addr_t pc = frame->GetFrameCodeAddress().GetLoadAddress(
         &frame->GetThread()->GetProcess()->GetTarget());
     if (pc != LLDB_INVALID_ADDRESS) {
-      rctx.reset(new RegisterContextHistory(
+      rctx = std::make_shared<RegisterContextHistory>(
           *frame->GetThread().get(), frame->GetConcreteFrameIndex(),
-          frame->GetThread()->GetProcess()->GetAddressByteSize(), pc));
+          frame->GetThread()->GetProcess()->GetAddressByteSize(), pc);
     }
   }
   return rctx;

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp Mon Feb 11 15:13:08 2019
@@ -19,6 +19,8 @@
 
 #include "Plugins/Process/Utility/InstructionUtils.h"
 
+#include <memory>
+
 // Support building against older versions of LLVM, this macro was added
 // recently.
 #ifndef LLVM_EXTENSION
@@ -1296,7 +1298,7 @@ bool RegisterContextDarwin_arm::WriteReg
 
 bool RegisterContextDarwin_arm::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
+  data_sp = std::make_shared<DataBufferHeap>(REG_CONTEXT_SIZE, 0);
   if (data_sp && ReadGPR(false) == KERN_SUCCESS &&
       ReadFPU(false) == KERN_SUCCESS && ReadEXC(false) == KERN_SUCCESS) {
     uint8_t *dst = data_sp->GetBytes();

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp Mon Feb 11 15:13:08 2019
@@ -23,6 +23,8 @@
 
 #include "Plugins/Process/Utility/InstructionUtils.h"
 
+#include <memory>
+
 // Support building against older versions of LLVM, this macro was added
 // recently.
 #ifndef LLVM_EXTENSION
@@ -648,7 +650,7 @@ bool RegisterContextDarwin_arm64::WriteR
 
 bool RegisterContextDarwin_arm64::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
+  data_sp = std::make_shared<DataBufferHeap>(REG_CONTEXT_SIZE, 0);
   if (data_sp && ReadGPR(false) == KERN_SUCCESS &&
       ReadFPU(false) == KERN_SUCCESS && ReadEXC(false) == KERN_SUCCESS) {
     uint8_t *dst = data_sp->GetBytes();

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp Mon Feb 11 15:13:08 2019
@@ -6,8 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <stddef.h>
-
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Endian.h"
@@ -17,6 +15,10 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
 
+#include <stddef.h>
+
+#include <memory>
+
 // Support building against older versions of LLVM, this macro was added
 // recently.
 #ifndef LLVM_EXTENSION
@@ -831,7 +833,7 @@ bool RegisterContextDarwin_i386::WriteRe
 
 bool RegisterContextDarwin_i386::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
+  data_sp = std::make_shared<DataBufferHeap>(REG_CONTEXT_SIZE, 0);
   if (data_sp && ReadGPR(false) == 0 && ReadFPU(false) == 0 &&
       ReadEXC(false) == 0) {
     uint8_t *dst = data_sp->GetBytes();

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp Mon Feb 11 15:13:08 2019
@@ -10,6 +10,8 @@
 #include <stdarg.h>
 #include <stddef.h>
 
+#include <memory>
+
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Endian.h"
@@ -909,7 +911,7 @@ bool RegisterContextDarwin_x86_64::Write
 
 bool RegisterContextDarwin_x86_64::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
-  data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
+  data_sp = std::make_shared<DataBufferHeap>(REG_CONTEXT_SIZE, 0);
   if (data_sp && ReadGPR(false) == 0 && ReadFPU(false) == 0 &&
       ReadEXC(false) == 0) {
     uint8_t *dst = data_sp->GetBytes();

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.cpp Mon Feb 11 15:13:08 2019
@@ -34,6 +34,8 @@
 
 #include "RegisterContextLLDB.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -369,7 +371,8 @@ void RegisterContextLLDB::InitializeNonZ
 
     if (abi) {
       m_fast_unwind_plan_sp.reset();
-      m_full_unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric));
+      m_full_unwind_plan_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       abi->CreateDefaultUnwindPlan(*m_full_unwind_plan_sp);
       if (m_frame_type != eSkipFrame) // don't override eSkipFrame
       {
@@ -716,8 +719,8 @@ UnwindPlanSP RegisterContextLLDB::GetFul
   Process *process = exe_ctx.GetProcessPtr();
   ABI *abi = process ? process->GetABI().get() : NULL;
   if (abi) {
-    arch_default_unwind_plan_sp.reset(
-        new UnwindPlan(lldb::eRegisterKindGeneric));
+    arch_default_unwind_plan_sp =
+        std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
     abi->CreateDefaultUnwindPlan(*arch_default_unwind_plan_sp);
   } else {
     UnwindLogMsg(
@@ -752,7 +755,8 @@ UnwindPlanSP RegisterContextLLDB::GetFul
          process->GetLoadAddressPermissions(current_pc_addr, permissions) &&
          (permissions & ePermissionsExecutable) == 0)) {
       if (abi) {
-        unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric));
+        unwind_plan_sp =
+            std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
         abi->CreateFunctionEntryUnwindPlan(*unwind_plan_sp);
         m_frame_type = eNormalFrame;
         return unwind_plan_sp;
@@ -793,7 +797,7 @@ UnwindPlanSP RegisterContextLLDB::GetFul
     DWARFCallFrameInfo *eh_frame =
         pc_module_sp->GetObjectFile()->GetUnwindTable().GetEHFrameInfo();
     if (eh_frame) {
-      unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric));
+      unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (eh_frame->GetUnwindPlan(m_current_pc, *unwind_plan_sp))
         return unwind_plan_sp;
       else
@@ -803,7 +807,7 @@ UnwindPlanSP RegisterContextLLDB::GetFul
     ArmUnwindInfo *arm_exidx =
         pc_module_sp->GetObjectFile()->GetUnwindTable().GetArmUnwindInfo();
     if (arm_exidx) {
-      unwind_plan_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric));
+      unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (arm_exidx->GetUnwindPlan(exe_ctx.GetTargetRef(), m_current_pc,
                                    *unwind_plan_sp))
         return unwind_plan_sp;

Modified: lldb/trunk/source/Plugins/Process/Utility/ThreadMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/ThreadMemory.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/ThreadMemory.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/ThreadMemory.cpp Mon Feb 11 15:13:08 2019
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "Plugins/Process/Utility/ThreadMemory.h"
+
 #include "Plugins/Process/Utility/RegisterContextThreadMemory.h"
 #include "lldb/Target/OperatingSystem.h"
 #include "lldb/Target/Process.h"
@@ -15,6 +16,8 @@
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Unwind.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -44,8 +47,8 @@ void ThreadMemory::ClearStackFrames() {
 
 RegisterContextSP ThreadMemory::GetRegisterContext() {
   if (!m_reg_context_sp)
-    m_reg_context_sp.reset(
-        new RegisterContextThreadMemory(*this, m_register_data_addr));
+    m_reg_context_sp = std::make_shared<RegisterContextThreadMemory>(
+        *this, m_register_data_addr);
   return m_reg_context_sp;
 }
 

Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp Mon Feb 11 15:13:08 2019
@@ -17,6 +17,8 @@
 
 #include "RegisterContextMacOSXFrameBackchain.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -65,8 +67,8 @@ UnwindMacOSXFrameBackchain::DoCreateRegi
   uint32_t concrete_idx = frame->GetConcreteFrameIndex();
   const uint32_t frame_count = GetFrameCount();
   if (concrete_idx < frame_count)
-    reg_ctx_sp.reset(new RegisterContextMacOSXFrameBackchain(
-        m_thread, concrete_idx, m_cursors[concrete_idx]));
+    reg_ctx_sp = std::make_shared<RegisterContextMacOSXFrameBackchain>(
+        m_thread, concrete_idx, m_cursors[concrete_idx]);
   return reg_ctx_sp;
 }
 

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Mon Feb 11 15:13:08 2019
@@ -8,6 +8,7 @@
 
 #include <stdlib.h>
 
+#include <memory>
 #include <mutex>
 
 #include "lldb/Core/Module.h"
@@ -65,8 +66,8 @@ lldb::ProcessSP ProcessElfCore::CreateIn
       lldb::offset_t data_offset = 0;
       if (elf_header.Parse(data, &data_offset)) {
         if (elf_header.e_type == llvm::ELF::ET_CORE)
-          process_sp.reset(
-              new ProcessElfCore(target_sp, listener_sp, *crash_file));
+          process_sp = std::make_shared<ProcessElfCore>(target_sp, listener_sp,
+                                                        *crash_file);
       }
     }
   }

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp Mon Feb 11 15:13:08 2019
@@ -11,14 +11,16 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 RegisterContextCorePOSIX_arm::RegisterContextCorePOSIX_arm(
     Thread &thread, RegisterInfoInterface *register_info,
     const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
     : RegisterContextPOSIX_arm(thread, 0, register_info) {
-  m_gpr_buffer.reset(
-      new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+  m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
+                                                  gpregset.GetByteSize());
   m_gpr.SetData(m_gpr_buffer);
   m_gpr.SetByteOrder(gpregset.GetByteOrder());
 }

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.cpp Mon Feb 11 15:13:08 2019
@@ -7,18 +7,21 @@
 //===----------------------------------------------------------------------===//
 
 #include "RegisterContextPOSIXCore_arm64.h"
+
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 RegisterContextCorePOSIX_arm64::RegisterContextCorePOSIX_arm64(
     Thread &thread, RegisterInfoInterface *register_info,
     const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
     : RegisterContextPOSIX_arm64(thread, 0, register_info) {
-  m_gpr_buffer.reset(
-      new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+  m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
+                                                  gpregset.GetByteSize());
   m_gpr.SetData(m_gpr_buffer);
   m_gpr.SetByteOrder(gpregset.GetByteOrder());
 }

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.cpp Mon Feb 11 15:13:08 2019
@@ -11,21 +11,23 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 RegisterContextCorePOSIX_mips64::RegisterContextCorePOSIX_mips64(
     Thread &thread, RegisterInfoInterface *register_info,
     const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
     : RegisterContextPOSIX_mips64(thread, 0, register_info) {
-  m_gpr_buffer.reset(
-      new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+  m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
+                                                  gpregset.GetByteSize());
   m_gpr.SetData(m_gpr_buffer);
   m_gpr.SetByteOrder(gpregset.GetByteOrder());
 
   DataExtractor fpregset = getRegset(
       notes, register_info->GetTargetArchitecture().GetTriple(), FPR_Desc);
-  m_fpr_buffer.reset(
-      new DataBufferHeap(fpregset.GetDataStart(), fpregset.GetByteSize()));
+  m_fpr_buffer = std::make_shared<DataBufferHeap>(fpregset.GetDataStart(),
+                                                  fpregset.GetByteSize());
   m_fpr.SetData(m_fpr_buffer);
   m_fpr.SetByteOrder(fpregset.GetByteOrder());
 }

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp Mon Feb 11 15:13:08 2019
@@ -12,27 +12,29 @@
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 RegisterContextCorePOSIX_powerpc::RegisterContextCorePOSIX_powerpc(
     Thread &thread, RegisterInfoInterface *register_info,
     const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
     : RegisterContextPOSIX_powerpc(thread, 0, register_info) {
-  m_gpr_buffer.reset(
-      new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+  m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
+                                                  gpregset.GetByteSize());
   m_gpr.SetData(m_gpr_buffer);
   m_gpr.SetByteOrder(gpregset.GetByteOrder());
 
   ArchSpec arch = register_info->GetTargetArchitecture();
   DataExtractor fpregset = getRegset(notes, arch.GetTriple(), FPR_Desc);
-  m_fpr_buffer.reset(
-      new DataBufferHeap(fpregset.GetDataStart(), fpregset.GetByteSize()));
+  m_fpr_buffer = std::make_shared<DataBufferHeap>(fpregset.GetDataStart(),
+                                                  fpregset.GetByteSize());
   m_fpr.SetData(m_fpr_buffer);
   m_fpr.SetByteOrder(fpregset.GetByteOrder());
 
   DataExtractor vregset = getRegset(notes, arch.GetTriple(), PPC_VMX_Desc);
-  m_vec_buffer.reset(
-      new DataBufferHeap(vregset.GetDataStart(), vregset.GetByteSize()));
+  m_vec_buffer = std::make_shared<DataBufferHeap>(vregset.GetDataStart(),
+                                                  vregset.GetByteSize());
   m_vec.SetData(m_vec_buffer);
   m_vec.SetByteOrder(vregset.GetByteOrder());
 }

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_ppc64le.cpp Mon Feb 11 15:13:08 2019
@@ -15,33 +15,35 @@
 #include "Plugins/Process/Utility/lldb-ppc64le-register-enums.h"
 #include "Plugins/Process/elf-core/RegisterUtilities.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 RegisterContextCorePOSIX_ppc64le::RegisterContextCorePOSIX_ppc64le(
     Thread &thread, RegisterInfoInterface *register_info,
     const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
     : RegisterContextPOSIX_ppc64le(thread, 0, register_info) {
-  m_gpr_buffer.reset(
-      new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+  m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
+                                                  gpregset.GetByteSize());
   m_gpr.SetData(m_gpr_buffer);
   m_gpr.SetByteOrder(gpregset.GetByteOrder());
 
   ArchSpec arch = register_info->GetTargetArchitecture();
   DataExtractor fpregset = getRegset(notes, arch.GetTriple(), FPR_Desc);
-  m_fpr_buffer.reset(
-      new DataBufferHeap(fpregset.GetDataStart(), fpregset.GetByteSize()));
+  m_fpr_buffer = std::make_shared<DataBufferHeap>(fpregset.GetDataStart(),
+                                                  fpregset.GetByteSize());
   m_fpr.SetData(m_fpr_buffer);
   m_fpr.SetByteOrder(fpregset.GetByteOrder());
 
   DataExtractor vmxregset = getRegset(notes, arch.GetTriple(), PPC_VMX_Desc);
-  m_vmx_buffer.reset(
-      new DataBufferHeap(vmxregset.GetDataStart(), vmxregset.GetByteSize()));
+  m_vmx_buffer = std::make_shared<DataBufferHeap>(vmxregset.GetDataStart(),
+                                                  vmxregset.GetByteSize());
   m_vmx.SetData(m_vmx_buffer);
   m_vmx.SetByteOrder(vmxregset.GetByteOrder());
 
   DataExtractor vsxregset = getRegset(notes, arch.GetTriple(), PPC_VSX_Desc);
-  m_vsx_buffer.reset(
-      new DataBufferHeap(vsxregset.GetDataStart(), vsxregset.GetByteSize()));
+  m_vsx_buffer = std::make_shared<DataBufferHeap>(vsxregset.GetDataStart(),
+                                                  vsxregset.GetByteSize());
   m_vsx.SetData(m_vsx_buffer);
   m_vsx.SetByteOrder(vsxregset.GetByteOrder());
 }

Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp Mon Feb 11 15:13:08 2019
@@ -12,21 +12,23 @@
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/RegisterValue.h"
 
+#include <memory>
+
 using namespace lldb_private;
 
 RegisterContextCorePOSIX_s390x::RegisterContextCorePOSIX_s390x(
     Thread &thread, RegisterInfoInterface *register_info,
     const DataExtractor &gpregset, llvm::ArrayRef<CoreNote> notes)
     : RegisterContextPOSIX_s390x(thread, 0, register_info) {
-  m_gpr_buffer.reset(
-      new DataBufferHeap(gpregset.GetDataStart(), gpregset.GetByteSize()));
+  m_gpr_buffer = std::make_shared<DataBufferHeap>(gpregset.GetDataStart(),
+                                                  gpregset.GetByteSize());
   m_gpr.SetData(m_gpr_buffer);
   m_gpr.SetByteOrder(gpregset.GetByteOrder());
 
   DataExtractor fpregset = getRegset(
       notes, register_info->GetTargetArchitecture().GetTriple(), FPR_Desc);
-  m_fpr_buffer.reset(
-      new DataBufferHeap(fpregset.GetDataStart(), fpregset.GetByteSize()));
+  m_fpr_buffer = std::make_shared<DataBufferHeap>(fpregset.GetDataStart(),
+                                                  fpregset.GetByteSize());
   m_fpr.SetData(m_fpr_buffer);
   m_fpr.SetByteOrder(fpregset.GetByteOrder());
 }

Modified: lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.cpp Mon Feb 11 15:13:08 2019
@@ -38,6 +38,8 @@
 #include "RegisterContextPOSIXCore_x86_64.h"
 #include "ThreadElfCore.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -186,40 +188,40 @@ ThreadElfCore::CreateRegisterContextForF
 
     switch (arch.GetMachine()) {
     case llvm::Triple::aarch64:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_arm64(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_arm64>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::arm:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_arm(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_arm>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::mipsel:
     case llvm::Triple::mips:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_mips64(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_mips64>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::mips64:
     case llvm::Triple::mips64el:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_mips64(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_mips64>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::ppc:
     case llvm::Triple::ppc64:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_powerpc(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_powerpc>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::ppc64le:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_ppc64le(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_ppc64le>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::systemz:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_s390x(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_s390x>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     case llvm::Triple::x86:
     case llvm::Triple::x86_64:
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_x86_64(
-          *this, reg_interface, m_gpregset_data, m_notes));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_x86_64>(
+          *this, reg_interface, m_gpregset_data, m_notes);
       break;
     default:
       break;

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp Mon Feb 11 15:13:08 2019
@@ -22,6 +22,8 @@
 #include "Utility/ARM_ehframe_Registers.h"
 #include "lldb/Utility/StringExtractorGDBRemote.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
@@ -488,8 +490,8 @@ bool GDBRemoteRegisterContext::ReadAllRe
       // ReadRegisterBytes saves the contents of the register in to the
       // m_reg_data buffer
     }
-    data_sp.reset(new DataBufferHeap(m_reg_data.GetDataStart(),
-                                     m_reg_info.GetRegisterDataByteSize()));
+    data_sp = std::make_shared<DataBufferHeap>(
+        m_reg_data.GetDataStart(), m_reg_info.GetRegisterDataByteSize());
     return true;
   } else {
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Feb 11 15:13:08 2019
@@ -23,6 +23,7 @@
 #include <algorithm>
 #include <csignal>
 #include <map>
+#include <memory>
 #include <mutex>
 #include <sstream>
 
@@ -124,7 +125,7 @@ public:
   }
 
   PluginProperties() : Properties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -152,7 +153,7 @@ typedef std::shared_ptr<PluginProperties
 static const ProcessKDPPropertiesSP &GetGlobalPluginProperties() {
   static ProcessKDPPropertiesSP g_settings_sp;
   if (!g_settings_sp)
-    g_settings_sp.reset(new PluginProperties());
+    g_settings_sp = std::make_shared<PluginProperties>();
   return g_settings_sp;
 }
 
@@ -246,7 +247,7 @@ ProcessGDBRemote::CreateInstance(lldb::T
                                  const FileSpec *crash_file_path) {
   lldb::ProcessSP process_sp;
   if (crash_file_path == NULL)
-    process_sp.reset(new ProcessGDBRemote(target_sp, listener_sp));
+    process_sp = std::make_shared<ProcessGDBRemote>(target_sp, listener_sp);
   return process_sp;
 }
 
@@ -1708,7 +1709,7 @@ bool ProcessGDBRemote::UpdateThreadList(
       ThreadSP thread_sp(
           old_thread_list_copy.RemoveThreadByProtocolID(tid, false));
       if (!thread_sp) {
-        thread_sp.reset(new ThreadGDBRemote(*this, tid));
+        thread_sp = std::make_shared<ThreadGDBRemote>(*this, tid);
         LLDB_LOGV(log, "Making new thread: {0} for thread ID: {1:x}.",
                   thread_sp.get(), thread_sp->GetID());
       } else {
@@ -1824,7 +1825,7 @@ ThreadSP ProcessGDBRemote::SetThreadStop
 
       if (!thread_sp) {
         // Create the thread if we need to
-        thread_sp.reset(new ThreadGDBRemote(*this, tid));
+        thread_sp = std::make_shared<ThreadGDBRemote>(*this, tid);
         m_thread_list_real.AddThread(thread_sp);
       }
     }
@@ -4060,8 +4061,8 @@ const DataBufferSP ProcessGDBRemote::Get
     if (m_gdb_comm.SendPacketsAndConcatenateResponses("qXfer:auxv:read::",
                                                       response_string) ==
         GDBRemoteCommunication::PacketResult::Success)
-      buf.reset(new DataBufferHeap(response_string.c_str(),
-                                   response_string.length()));
+      buf = std::make_shared<DataBufferHeap>(response_string.c_str(),
+                                             response_string.length());
   }
   return buf;
 }
@@ -5424,7 +5425,7 @@ public:
 
 CommandObject *ProcessGDBRemote::GetPluginCommandObject() {
   if (!m_command_sp)
-    m_command_sp.reset(new CommandObjectMultiwordProcessGDBRemote(
-        GetTarget().GetDebugger().GetCommandInterpreter()));
+    m_command_sp = std::make_shared<CommandObjectMultiwordProcessGDBRemote>(
+        GetTarget().GetDebugger().GetCommandInterpreter());
   return m_command_sp.get();
 }

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Mon Feb 11 15:13:08 2019
@@ -20,10 +20,12 @@
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/State.h"
 #include "lldb/Utility/StreamString.h"
+#include "lldb/Utility/StringExtractorGDBRemote.h"
 
 #include "ProcessGDBRemote.h"
 #include "ProcessGDBRemoteLog.h"
-#include "lldb/Utility/StringExtractorGDBRemote.h"
+
+#include <memory>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -307,9 +309,9 @@ ThreadGDBRemote::CreateRegisterContextFo
       // supported.
       bool read_all_registers_at_once =
           !gdb_process->GetGDBRemote().GetpPacketSupported(GetID());
-      reg_ctx_sp.reset(new GDBRemoteRegisterContext(
+      reg_ctx_sp = std::make_shared<GDBRemoteRegisterContext>(
           *this, concrete_frame_idx, gdb_process->m_register_info,
-          read_all_registers_at_once));
+          read_all_registers_at_once);
     }
   } else {
     Unwind *unwinder = GetUnwinder();

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Mon Feb 11 15:13:08 2019
@@ -12,7 +12,6 @@
 
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/Threading.h"
-#include <mutex>
 
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
@@ -39,6 +38,9 @@
 #include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 
+#include <memory>
+#include <mutex>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -70,8 +72,8 @@ lldb::ProcessSP ProcessMachCore::CreateI
       llvm::MachO::mach_header mach_header;
       if (ObjectFileMachO::ParseHeader(data, &data_offset, mach_header)) {
         if (mach_header.filetype == llvm::MachO::MH_CORE)
-          process_sp.reset(
-              new ProcessMachCore(target_sp, listener_sp, *crash_file));
+          process_sp = std::make_shared<ProcessMachCore>(target_sp, listener_sp,
+                                                         *crash_file);
       }
     }
   }

Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp Mon Feb 11 15:13:08 2019
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "ProcessMinidump.h"
+
 #include "ThreadMinidump.h"
 
 #include "lldb/Core/DumpDataExtractor.h"
@@ -34,8 +35,7 @@
 
 #include "Plugins/Process/Utility/StopInfoMachException.h"
 
-// C includes
-// C++ includes
+#include <memory>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -644,7 +644,7 @@ public:
 
 CommandObject *ProcessMinidump::GetPluginCommandObject() {
   if (!m_command_sp)
-    m_command_sp.reset(new CommandObjectMultiwordProcessMinidump(
-        GetTarget().GetDebugger().GetCommandInterpreter()));
+    m_command_sp = std::make_shared<CommandObjectMultiwordProcessMinidump>(
+        GetTarget().GetDebugger().GetCommandInterpreter());
   return m_command_sp.get();
 }

Modified: lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ThreadMinidump.cpp Mon Feb 11 15:13:08 2019
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "ThreadMinidump.h"
+
 #include "ProcessMinidump.h"
 
 #include "RegisterContextMinidump_ARM.h"
@@ -26,6 +27,7 @@
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Log.h"
 
+#include <memory>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -71,8 +73,9 @@ ThreadMinidump::CreateRegisterContextFor
       lldb::DataBufferSP buf =
           ConvertMinidumpContext_x86_32(m_gpregset_data, reg_interface);
       DataExtractor gpregset(buf, lldb::eByteOrderLittle, 4);
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_x86_64(
-          *this, reg_interface, gpregset, {}));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_x86_64>(
+          *this, reg_interface, gpregset,
+          llvm::ArrayRef<lldb_private::CoreNote>());
       break;
     }
     case llvm::Triple::x86_64: {
@@ -80,22 +83,24 @@ ThreadMinidump::CreateRegisterContextFor
       lldb::DataBufferSP buf =
           ConvertMinidumpContext_x86_64(m_gpregset_data, reg_interface);
       DataExtractor gpregset(buf, lldb::eByteOrderLittle, 8);
-      m_thread_reg_ctx_sp.reset(new RegisterContextCorePOSIX_x86_64(
-          *this, reg_interface, gpregset, {}));
+      m_thread_reg_ctx_sp = std::make_shared<RegisterContextCorePOSIX_x86_64>(
+          *this, reg_interface, gpregset,
+          llvm::ArrayRef<lldb_private::CoreNote>());
       break;
     }
     case llvm::Triple::aarch64: {
       DataExtractor data(m_gpregset_data.data(), m_gpregset_data.size(),
                          lldb::eByteOrderLittle, 8);
-      m_thread_reg_ctx_sp.reset(new RegisterContextMinidump_ARM64(*this, data));
+      m_thread_reg_ctx_sp =
+          std::make_shared<RegisterContextMinidump_ARM64>(*this, data);
       break;
     }
     case llvm::Triple::arm: {
       DataExtractor data(m_gpregset_data.data(), m_gpregset_data.size(),
                          lldb::eByteOrderLittle, 8);
       const bool apple = arch.GetTriple().getVendor() == llvm::Triple::Apple;
-      m_thread_reg_ctx_sp.reset(
-          new RegisterContextMinidump_ARM(*this, data, apple));
+      m_thread_reg_ctx_sp =
+          std::make_shared<RegisterContextMinidump_ARM>(*this, data, apple);
       break;
     }
     default:

Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp Mon Feb 11 15:13:08 2019
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include <memory>
 #include <mutex>
 #include <string>
 
@@ -811,7 +812,7 @@ bool ScriptInterpreterPython::ExecuteOne
             join_read_thread = true;
             FILE *outfile_handle =
                 fdopen(pipe.ReleaseWriteFileDescriptor(), "w");
-            output_file_sp.reset(new StreamFile(outfile_handle, true));
+            output_file_sp = std::make_shared<StreamFile>(outfile_handle, true);
             error_file_sp = output_file_sp;
             if (outfile_handle)
               ::setbuf(outfile_handle, nullptr);
@@ -827,12 +828,12 @@ bool ScriptInterpreterPython::ExecuteOne
         debugger.AdoptTopIOHandlerFilesIfInvalid(input_file_sp, output_file_sp,
                                                  error_file_sp);
     } else {
-      input_file_sp.reset(new StreamFile());
+      input_file_sp = std::make_shared<StreamFile>();
       FileSystem::Instance().Open(input_file_sp->GetFile(),
                                   FileSpec(FileSystem::DEV_NULL),
                                   File::eOpenOptionRead);
 
-      output_file_sp.reset(new StreamFile());
+      output_file_sp = std::make_shared<StreamFile>();
       FileSystem::Instance().Open(output_file_sp->GetFile(),
                                   FileSpec(FileSystem::DEV_NULL),
                                   File::eOpenOptionWrite);
@@ -2220,7 +2221,7 @@ bool ScriptInterpreterPython::GetScripte
   }
 
   if (new_callee && old_callee != new_callee)
-    callee_wrapper_sp.reset(new StructuredPythonObject(new_callee));
+    callee_wrapper_sp = std::make_shared<StructuredPythonObject>(new_callee);
 
   return ret_val;
 }
@@ -2879,7 +2880,7 @@ bool ScriptInterpreterPython::LoadScript
               ScriptInterpreter::eScriptReturnTypeOpaqueObject,
               &module_pyobj) &&
           module_pyobj)
-        module_sp->reset(new StructuredPythonObject(module_pyobj));
+        *module_sp = std::make_shared<StructuredPythonObject>(module_pyobj);
     }
 
     return true;

Modified: lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp (original)
+++ lldb/trunk/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp Mon Feb 11 15:13:08 2019
@@ -8,10 +8,9 @@
 
 #include "StructuredDataDarwinLog.h"
 
-// C includes
 #include <string.h>
 
-// C++ includes
+#include <memory>
 #include <sstream>
 
 #include "lldb/Breakpoint/StoppointCallbackContext.h"
@@ -144,7 +143,7 @@ public:
   }
 
   StructuredDataDarwinLogProperties() : Properties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -171,7 +170,7 @@ using StructuredDataDarwinLogPropertiesS
 static const StructuredDataDarwinLogPropertiesSP &GetGlobalProperties() {
   static StructuredDataDarwinLogPropertiesSP g_settings_sp;
   if (!g_settings_sp)
-    g_settings_sp.reset(new StructuredDataDarwinLogProperties());
+    g_settings_sp = std::make_shared<StructuredDataDarwinLogProperties>();
   return g_settings_sp;
 }
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp Mon Feb 11 15:13:08 2019
@@ -43,6 +43,7 @@
 #include "clang/AST/DeclTemplate.h"
 
 #include <map>
+#include <memory>
 #include <vector>
 
 //#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN
@@ -522,10 +523,10 @@ TypeSP DWARFASTParserClang::ParseTypeFro
           }
         }
 
-        type_sp.reset(
-            new Type(die.GetID(), dwarf, type_name_const_str, byte_size, NULL,
-                     DIERef(encoding_uid).GetUID(dwarf), encoding_data_type,
-                     &decl, clang_type, resolve_state));
+        type_sp = std::make_shared<Type>(
+            die.GetID(), dwarf, type_name_const_str, byte_size, nullptr,
+            DIERef(encoding_uid).GetUID(dwarf), encoding_data_type, &decl,
+            clang_type, resolve_state);
 
         dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
       } break;
@@ -842,10 +843,10 @@ TypeSP DWARFASTParserClang::ParseTypeFro
         // parameters in any class methods need it for the clang types for
         // function prototypes.
         LinkDeclContextToDIE(m_ast.GetDeclContextForType(clang_type), die);
-        type_sp.reset(new Type(die.GetID(), dwarf, type_name_const_str,
-                               byte_size, NULL, LLDB_INVALID_UID,
-                               Type::eEncodingIsUID, &decl, clang_type,
-                               Type::eResolveStateForward));
+        type_sp = std::make_shared<Type>(
+            die.GetID(), dwarf, type_name_const_str, byte_size, nullptr,
+            LLDB_INVALID_UID, Type::eEncodingIsUID, &decl, clang_type,
+            Type::eResolveStateForward);
 
         type_sp->SetIsCompleteObjCClass(is_complete_objc_class);
 
@@ -1102,10 +1103,10 @@ TypeSP DWARFASTParserClang::ParseTypeFro
           LinkDeclContextToDIE(
               ClangASTContext::GetDeclContextForType(clang_type), die);
 
-          type_sp.reset(new Type(
-              die.GetID(), dwarf, type_name_const_str, byte_size, NULL,
+          type_sp = std::make_shared<Type>(
+              die.GetID(), dwarf, type_name_const_str, byte_size, nullptr,
               DIERef(encoding_form).GetUID(dwarf), Type::eEncodingIsUID, &decl,
-              clang_type, Type::eResolveStateForward));
+              clang_type, Type::eResolveStateForward);
 
           if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
             if (die.HasChildren()) {
@@ -1651,10 +1652,10 @@ TypeSP DWARFASTParserClang::ParseTypeFro
             }
           }
         }
-        type_sp.reset(new Type(die.GetID(), dwarf, type_name_const_str,
-                               llvm::None, NULL, LLDB_INVALID_UID,
-                               Type::eEncodingIsUID, &decl, clang_type,
-                               Type::eResolveStateFull));
+        type_sp = std::make_shared<Type>(
+            die.GetID(), dwarf, type_name_const_str, llvm::None, nullptr,
+            LLDB_INVALID_UID, Type::eEncodingIsUID, &decl, clang_type,
+            Type::eResolveStateFull);
         assert(type_sp.get());
       } break;
 
@@ -1802,10 +1803,11 @@ TypeSP DWARFASTParserClang::ParseTypeFro
                   m_ast.CreateArrayType(array_element_type, 0, is_vector);
             }
             ConstString empty_name;
-            type_sp.reset(new Type(
+            type_sp = std::make_shared<Type>(
                 die.GetID(), dwarf, empty_name, array_element_bit_stride / 8,
-                NULL, DIERef(type_die_form).GetUID(dwarf), Type::eEncodingIsUID,
-                &decl, clang_type, Type::eResolveStateFull));
+                nullptr, DIERef(type_die_form).GetUID(dwarf),
+                Type::eEncodingIsUID, &decl, clang_type,
+                Type::eResolveStateFull);
             type_sp->SetEncodingType(element_type);
             m_ast.SetMetadataAsUserID(clang_type.GetOpaqueQualType(),
                                       die.GetID());
@@ -1849,10 +1851,10 @@ TypeSP DWARFASTParserClang::ParseTypeFro
           if (llvm::Optional<uint64_t> clang_type_size =
                   clang_type.GetByteSize(nullptr)) {
             byte_size = *clang_type_size;
-            type_sp.reset(new Type(die.GetID(), dwarf, type_name_const_str,
-                                   byte_size, NULL, LLDB_INVALID_UID,
-                                   Type::eEncodingIsUID, NULL, clang_type,
-                                   Type::eResolveStateForward));
+            type_sp = std::make_shared<Type>(
+                die.GetID(), dwarf, type_name_const_str, byte_size, nullptr,
+                LLDB_INVALID_UID, Type::eEncodingIsUID, nullptr, clang_type,
+                Type::eResolveStateForward);
           }
         }
 
@@ -2652,10 +2654,11 @@ Function *DWARFASTParserClang::ParseFunc
 
       if (dwarf->FixupAddress(func_range.GetBaseAddress())) {
         const user_id_t func_user_id = die.GetID();
-        func_sp.reset(new Function(&comp_unit,
+        func_sp =
+            std::make_shared<Function>(&comp_unit,
                                    func_user_id, // UserID is the DIE offset
                                    func_user_id, func_name, func_type,
-                                   func_range)); // first address range
+                                       func_range); // first address range
 
         if (func_sp.get() != NULL) {
           if (frame_base.IsValid())

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp Mon Feb 11 15:13:08 2019
@@ -11,6 +11,8 @@
 //#define ENABLE_DEBUG_PRINTF   // DO NOT LEAVE THIS DEFINED: DEBUG ONLY!!!
 #include <assert.h>
 
+#include <memory>
+
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Host/Host.h"
@@ -48,7 +50,7 @@ void DWARFDebugLine::Parse(const DWARFDa
       // DEBUG_PRINTF("m_lineTableMap[0x%8.8x] = line_table_sp\n",
       // debug_line_offset);
       m_lineTableMap[debug_line_offset] = line_table_sp;
-      line_table_sp.reset(new LineTable);
+      line_table_sp = std::make_shared<LineTable>();
     } else
       ++offset; // Try next byte in line table
   }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Feb 11 15:13:08 2019
@@ -73,6 +73,7 @@
 #include "llvm/Support/FileSystem.h"
 
 #include <map>
+#include <memory>
 
 #include <ctype.h>
 #include <string.h>
@@ -130,7 +131,7 @@ public:
   }
 
   PluginProperties() {
-    m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+    m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
     m_collection_sp->Initialize(g_properties);
   }
 
@@ -770,9 +771,9 @@ lldb::CompUnitSP SymbolFileDWARF::ParseC
                 cu_die.GetAttributeValueAsUnsigned(DW_AT_language, 0));
 
             bool is_optimized = dwarf_cu->GetIsOptimized();
-            cu_sp.reset(new CompileUnit(
+            cu_sp = std::make_shared<CompileUnit>(
                 module_sp, dwarf_cu, cu_file_spec, dwarf_cu->GetID(),
-                cu_language, is_optimized ? eLazyBoolYes : eLazyBoolNo));
+                cu_language, is_optimized ? eLazyBoolYes : eLazyBoolNo);
             if (cu_sp) {
               // If we just created a compile unit with an invalid file spec,
               // try and get the first entry in the supports files from the
@@ -3126,7 +3127,7 @@ size_t SymbolFileDWARF::ParseVariablesFo
       VariableListSP variables(sc.comp_unit->GetVariableList(false));
 
       if (variables.get() == NULL) {
-        variables.reset(new VariableList());
+        variables = std::make_shared<VariableList>();
         sc.comp_unit->SetVariableList(variables);
 
         DIEArray die_offsets;
@@ -3540,10 +3541,10 @@ VariableSP SymbolFileDWARF::ParseVariabl
               type_sp->GetType()->GetByteSize().getValueOr(0),
               die.GetCU()->GetAddressByteSize());
 
-        var_sp.reset(new Variable(die.GetID(), name, mangled, type_sp, scope,
-                                  symbol_context_scope, scope_ranges, &decl,
-                                  location, is_external, is_artificial,
-                                  is_static_member));
+        var_sp = std::make_shared<Variable>(
+            die.GetID(), name, mangled, type_sp, scope, symbol_context_scope,
+            scope_ranges, &decl, location, is_external, is_artificial,
+            is_static_member);
 
         var_sp->SetLocationIsConstantValueData(location_is_const_value_data);
       } else {
@@ -3641,7 +3642,7 @@ size_t SymbolFileDWARF::ParseVariables(c
             if (sc.comp_unit != NULL) {
               variable_list_sp = sc.comp_unit->GetVariableList(false);
               if (variable_list_sp.get() == NULL) {
-                variable_list_sp.reset(new VariableList());
+                variable_list_sp = std::make_shared<VariableList>();
               }
             } else {
               GetObjectFile()->GetModule()->ReportError(
@@ -3680,7 +3681,7 @@ size_t SymbolFileDWARF::ParseVariables(c
                 const bool can_create = false;
                 variable_list_sp = block->GetBlockVariableList(can_create);
                 if (variable_list_sp.get() == NULL) {
-                  variable_list_sp.reset(new VariableList());
+                  variable_list_sp = std::make_shared<VariableList>();
                   block->SetVariableList(variable_list_sp);
                 }
               }

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp Mon Feb 11 15:13:08 2019
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "SymbolFileDWARFDebugMap.h"
-
 #include "DWARFDebugAranges.h"
 
 #include "lldb/Core/Module.h"
@@ -35,6 +34,8 @@
 #include "LogChannelDWARF.h"
 #include "SymbolFileDWARF.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -411,7 +412,7 @@ Module *SymbolFileDWARFDebugMap::GetModu
       comp_unit_info->oso_sp = pos->second;
     } else {
       ObjectFile *obj_file = GetObjectFile();
-      comp_unit_info->oso_sp.reset(new OSOInfo());
+      comp_unit_info->oso_sp = std::make_shared<OSOInfo>();
       m_oso_map[{comp_unit_info->oso_path, comp_unit_info->oso_mod_time}] =
           comp_unit_info->oso_sp;
       const char *oso_path = comp_unit_info->oso_path.GetCString();
@@ -455,11 +456,10 @@ Module *SymbolFileDWARFDebugMap::GetModu
                              .getArchName()
                              .str()
                              .c_str());
-      comp_unit_info->oso_sp->module_sp.reset(new DebugMapModule(
+      comp_unit_info->oso_sp->module_sp = std::make_shared<DebugMapModule>(
           obj_file->GetModule(), GetCompUnitInfoIndex(comp_unit_info), oso_file,
-          oso_arch, oso_object ? &oso_object : NULL, 0,
-          oso_object ? comp_unit_info->oso_mod_time
-                     : llvm::sys::TimePoint<>()));
+          oso_arch, oso_object ? &oso_object : nullptr, 0,
+          oso_object ? comp_unit_info->oso_mod_time : llvm::sys::TimePoint<>());
     }
   }
   if (comp_unit_info->oso_sp)
@@ -581,9 +581,10 @@ CompUnitSP SymbolFileDWARFDebugMap::Pars
         // User zero as the ID to match the compile unit at offset zero in each
         // .o file since each .o file can only have one compile unit for now.
         lldb::user_id_t cu_id = 0;
-        m_compile_unit_infos[cu_idx].compile_unit_sp.reset(
-            new CompileUnit(m_obj_file->GetModule(), NULL, so_file_spec, cu_id,
-                            eLanguageTypeUnknown, eLazyBoolCalculate));
+        m_compile_unit_infos[cu_idx].compile_unit_sp =
+            std::make_shared<CompileUnit>(
+                m_obj_file->GetModule(), nullptr, so_file_spec, cu_id,
+                eLanguageTypeUnknown, eLazyBoolCalculate);
 
         if (m_compile_unit_infos[cu_idx].compile_unit_sp) {
           // Let our symbol vendor know about this compile unit

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Mon Feb 11 15:13:08 2019
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "SymbolFileSymtab.h"
+
 #include "lldb/Core/Module.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Symbol/CompileUnit.h"
@@ -19,6 +20,8 @@
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Timer.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -123,9 +126,9 @@ CompUnitSP SymbolFileSymtab::ParseCompil
     const Symbol *cu_symbol =
         m_obj_file->GetSymtab()->SymbolAtIndex(m_source_indexes[idx]);
     if (cu_symbol)
-      cu_sp.reset(new CompileUnit(m_obj_file->GetModule(), NULL,
+      cu_sp = std::make_shared<CompileUnit>(m_obj_file->GetModule(), nullptr,
                                   cu_symbol->GetName().AsCString(), 0,
-                                  eLanguageTypeUnknown, eLazyBoolNo));
+                                            eLanguageTypeUnknown, eLazyBoolNo);
   }
   return cu_sp;
 }

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp Mon Feb 11 15:13:08 2019
@@ -29,6 +29,8 @@
 
 #include "SystemRuntimeMacOSX.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -495,9 +497,9 @@ ThreadSP SystemRuntimeMacOSX::GetExtende
           bool stop_id_is_valid = true;
           if (item.stop_id == 0)
             stop_id_is_valid = false;
-          originating_thread_sp.reset(new HistoryThread(
+          originating_thread_sp = std::make_shared<HistoryThread>(
               *m_process, item.enqueuing_thread_id, item.enqueuing_callstack,
-              item.stop_id, stop_id_is_valid));
+              item.stop_id, stop_id_is_valid);
           originating_thread_sp->SetExtendedBacktraceToken(
               item.item_that_enqueued_this);
           originating_thread_sp->SetQueueName(
@@ -540,9 +542,9 @@ SystemRuntimeMacOSX::GetExtendedBacktrac
       bool stop_id_is_valid = true;
       if (item.stop_id == 0)
         stop_id_is_valid = false;
-      return_thread_sp.reset(new HistoryThread(
+      return_thread_sp = std::make_shared<HistoryThread>(
           *m_process, item.enqueuing_thread_id, item.enqueuing_callstack,
-          item.stop_id, stop_id_is_valid));
+          item.stop_id, stop_id_is_valid);
       return_thread_sp->SetExtendedBacktraceToken(item.item_that_enqueued_this);
       return_thread_sp->SetQueueName(item.enqueuing_queue_label.c_str());
       return_thread_sp->SetQueueID(item.enqueuing_queue_serialnum);
@@ -567,10 +569,10 @@ SystemRuntimeMacOSX::GetExtendedBacktrac
   if (queue_item_sp->GetStopID() == 0)
     stop_id_is_valid = false;
 
-  extended_thread_sp.reset(
-      new HistoryThread(*m_process, queue_item_sp->GetEnqueueingThreadID(),
-                        queue_item_sp->GetEnqueueingBacktrace(),
-                        queue_item_sp->GetStopID(), stop_id_is_valid));
+  extended_thread_sp = std::make_shared<HistoryThread>(
+      *m_process, queue_item_sp->GetEnqueueingThreadID(),
+      queue_item_sp->GetEnqueueingBacktrace(), queue_item_sp->GetStopID(),
+      stop_id_is_valid);
   extended_thread_sp->SetExtendedBacktraceToken(
       queue_item_sp->GetItemThatEnqueuedThis());
   extended_thread_sp->SetQueueName(queue_item_sp->GetQueueLabel().c_str());

Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp Mon Feb 11 15:13:08 2019
@@ -8,6 +8,8 @@
 
 #include "x86AssemblyInspectionEngine.h"
 
+#include <memory>
+
 #include "llvm-c/Disassembler.h"
 
 #include "lldb/Core/Address.h"
@@ -1172,7 +1174,7 @@ bool x86AssemblyInspectionEngine::Augmen
       *new_row = *original_last_row;
       new_row->SetOffset(offset);
       unwind_plan.AppendRow(new_row);
-      row.reset(new UnwindPlan::Row());
+      row = std::make_shared<UnwindPlan::Row>();
       *row = *new_row;
       reinstate_unwind_state = false;
       unwind_plan_updated = true;

Modified: lldb/trunk/source/Symbol/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Block.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Block.cpp (original)
+++ lldb/trunk/source/Symbol/Block.cpp Mon Feb 11 15:13:08 2019
@@ -16,6 +16,8 @@
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Utility/Log.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -363,8 +365,8 @@ void Block::AddChild(const BlockSP &chil
 void Block::SetInlinedFunctionInfo(const char *name, const char *mangled,
                                    const Declaration *decl_ptr,
                                    const Declaration *call_decl_ptr) {
-  m_inlineInfoSP.reset(
-      new InlineFunctionInfo(name, mangled, decl_ptr, call_decl_ptr));
+  m_inlineInfoSP = std::make_shared<InlineFunctionInfo>(name, mangled, decl_ptr,
+                                                        call_decl_ptr);
 }
 
 VariableListSP Block::GetBlockVariableList(bool can_create) {

Modified: lldb/trunk/source/Symbol/ClangASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTImporter.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTImporter.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTImporter.cpp Mon Feb 11 15:13:08 2019
@@ -18,6 +18,8 @@
 #include "clang/AST/DeclObjC.h"
 #include "llvm/Support/raw_ostream.h"
 
+#include <memory>
+
 using namespace lldb_private;
 using namespace clang;
 
@@ -765,7 +767,7 @@ void ClangASTImporter::BuildNamespaceMap
 
   NamespaceMapSP new_map;
 
-  new_map.reset(new NamespaceMap);
+  new_map = std::make_shared<NamespaceMap>();
 
   if (context_md->m_map_completer) {
     std::string namespace_string = decl->getDeclName().getAsString();

Modified: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompactUnwindInfo.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp (original)
+++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp Mon Feb 11 15:13:08 2019
@@ -17,10 +17,12 @@
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
-#include <algorithm>
 
 #include "llvm/Support/MathExtras.h"
 
+#include <algorithm>
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -263,8 +265,8 @@ void CompactUnwindInfo::ScanIndex(const
       // have a live process and can read them out of memory.
       if (process_sp.get() == nullptr)
         return;
-      m_section_contents_if_encrypted.reset(
-          new DataBufferHeap(m_section_sp->GetByteSize(), 0));
+      m_section_contents_if_encrypted =
+          std::make_shared<DataBufferHeap>(m_section_sp->GetByteSize(), 0);
       Status error;
       if (process_sp->ReadMemory(
               m_section_sp->GetLoadBaseAddress(&process_sp->GetTarget()),

Modified: lldb/trunk/source/Symbol/FuncUnwinders.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/FuncUnwinders.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/FuncUnwinders.cpp (original)
+++ lldb/trunk/source/Symbol/FuncUnwinders.cpp Mon Feb 11 15:13:08 2019
@@ -23,6 +23,8 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/UnwindAssembly.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -110,8 +112,8 @@ UnwindPlanSP FuncUnwinders::GetEHFrameUn
       current_pc.SetOffset(current_pc.GetOffset() + current_offset);
     DWARFCallFrameInfo *eh_frame = m_unwind_table.GetEHFrameInfo();
     if (eh_frame) {
-      m_unwind_plan_eh_frame_sp.reset(
-          new UnwindPlan(lldb::eRegisterKindGeneric));
+      m_unwind_plan_eh_frame_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (!eh_frame->GetUnwindPlan(current_pc, *m_unwind_plan_eh_frame_sp))
         m_unwind_plan_eh_frame_sp.reset();
     }
@@ -132,8 +134,8 @@ UnwindPlanSP FuncUnwinders::GetDebugFram
       current_pc.SetOffset(current_pc.GetOffset() + current_offset);
     DWARFCallFrameInfo *debug_frame = m_unwind_table.GetDebugFrameInfo();
     if (debug_frame) {
-      m_unwind_plan_debug_frame_sp.reset(
-          new UnwindPlan(lldb::eRegisterKindGeneric));
+      m_unwind_plan_debug_frame_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (!debug_frame->GetUnwindPlan(current_pc,
                                       *m_unwind_plan_debug_frame_sp))
         m_unwind_plan_debug_frame_sp.reset();
@@ -155,8 +157,8 @@ UnwindPlanSP FuncUnwinders::GetArmUnwind
       current_pc.SetOffset(current_pc.GetOffset() + current_offset);
     ArmUnwindInfo *arm_unwind_info = m_unwind_table.GetArmUnwindInfo();
     if (arm_unwind_info) {
-      m_unwind_plan_arm_unwind_sp.reset(
-          new UnwindPlan(lldb::eRegisterKindGeneric));
+      m_unwind_plan_arm_unwind_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (!arm_unwind_info->GetUnwindPlan(target, current_pc,
                                           *m_unwind_plan_arm_unwind_sp))
         m_unwind_plan_arm_unwind_sp.reset();
@@ -189,7 +191,8 @@ UnwindPlanSP FuncUnwinders::GetEHFrameAu
   if (!eh_frame_plan)
     return m_unwind_plan_eh_frame_augmented_sp;
 
-  m_unwind_plan_eh_frame_augmented_sp.reset(new UnwindPlan(*eh_frame_plan));
+  m_unwind_plan_eh_frame_augmented_sp =
+      std::make_shared<UnwindPlan>(*eh_frame_plan);
 
   // Augment the eh_frame instructions with epilogue descriptions if necessary
   // so the UnwindPlan can be used at any instruction in the function.
@@ -231,8 +234,8 @@ FuncUnwinders::GetDebugFrameAugmentedUnw
   if (!debug_frame_plan)
     return m_unwind_plan_debug_frame_augmented_sp;
 
-  m_unwind_plan_debug_frame_augmented_sp.reset(
-      new UnwindPlan(*debug_frame_plan));
+  m_unwind_plan_debug_frame_augmented_sp =
+      std::make_shared<UnwindPlan>(*debug_frame_plan);
 
   // Augment the debug_frame instructions with epilogue descriptions if
   // necessary so the UnwindPlan can be used at any instruction in the
@@ -262,7 +265,8 @@ UnwindPlanSP FuncUnwinders::GetAssemblyU
 
   UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
   if (assembly_profiler_sp) {
-    m_unwind_plan_assembly_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric));
+    m_unwind_plan_assembly_sp =
+        std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
     if (!assembly_profiler_sp->GetNonCallSiteUnwindPlanFromAssembly(
             m_range, thread, *m_unwind_plan_assembly_sp)) {
       m_unwind_plan_assembly_sp.reset();
@@ -364,7 +368,8 @@ UnwindPlanSP FuncUnwinders::GetUnwindPla
 
   UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
   if (assembly_profiler_sp) {
-    m_unwind_plan_fast_sp.reset(new UnwindPlan(lldb::eRegisterKindGeneric));
+    m_unwind_plan_fast_sp =
+        std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
     if (!assembly_profiler_sp->GetFastUnwindPlan(m_range, thread,
                                                  *m_unwind_plan_fast_sp)) {
       m_unwind_plan_fast_sp.reset();
@@ -385,8 +390,8 @@ UnwindPlanSP FuncUnwinders::GetUnwindPla
   if (process_sp) {
     ABI *abi = process_sp->GetABI().get();
     if (abi) {
-      m_unwind_plan_arch_default_sp.reset(
-          new UnwindPlan(lldb::eRegisterKindGeneric));
+      m_unwind_plan_arch_default_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (!abi->CreateDefaultUnwindPlan(*m_unwind_plan_arch_default_sp)) {
         m_unwind_plan_arch_default_sp.reset();
       }
@@ -410,8 +415,8 @@ FuncUnwinders::GetUnwindPlanArchitecture
   if (process_sp) {
     ABI *abi = process_sp->GetABI().get();
     if (abi) {
-      m_unwind_plan_arch_default_at_func_entry_sp.reset(
-          new UnwindPlan(lldb::eRegisterKindGeneric));
+      m_unwind_plan_arch_default_at_func_entry_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
       if (!abi->CreateFunctionEntryUnwindPlan(
               *m_unwind_plan_arch_default_at_func_entry_sp)) {
         m_unwind_plan_arch_default_at_func_entry_sp.reset();

Modified: lldb/trunk/source/Target/CPPLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/CPPLanguageRuntime.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/CPPLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/CPPLanguageRuntime.cpp Mon Feb 11 15:13:08 2019
@@ -11,6 +11,8 @@
 
 #include <string.h>
 
+#include <memory>
+
 #include "llvm/ADT/StringRef.h"
 
 #include "lldb/Symbol/Block.h"
@@ -327,16 +329,16 @@ CPPLanguageRuntime::GetStepThroughTrampo
         value_sp->GetValueIsValid()) {
       // We found the std::function wrapped callable and we have its address.
       // We now create a ThreadPlan to run to the callable.
-      ret_plan_sp.reset(new ThreadPlanRunToAddress(
-          thread, callable_info.callable_address, stop_others));
+      ret_plan_sp = std::make_shared<ThreadPlanRunToAddress>(
+          thread, callable_info.callable_address, stop_others);
       return ret_plan_sp;
     } else {
       // We are in std::function but we could not obtain the callable.
       // We create a ThreadPlan to keep stepping through using the address range
       // of the current function.
-      ret_plan_sp.reset(new ThreadPlanStepInRange(thread, range_of_curr_func,
-                                                  sc, eOnlyThisThread,
-                                                  eLazyBoolYes, eLazyBoolYes));
+      ret_plan_sp = std::make_shared<ThreadPlanStepInRange>(
+          thread, range_of_curr_func, sc, eOnlyThisThread, eLazyBoolYes,
+          eLazyBoolYes);
       return ret_plan_sp;
     }
   }

Modified: lldb/trunk/source/Target/Memory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Memory.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/Memory.cpp (original)
+++ lldb/trunk/source/Target/Memory.cpp Mon Feb 11 15:13:08 2019
@@ -7,13 +7,16 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Target/Memory.h"
-#include <inttypes.h>
+
 #include "lldb/Core/RangeMap.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/State.h"
 
+#include <cinttypes>
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -357,8 +360,8 @@ AllocatedMemoryCache::AllocatePage(uint3
   }
 
   if (addr != LLDB_INVALID_ADDRESS) {
-    block_sp.reset(
-        new AllocatedBlock(addr, page_byte_size, permissions, chunk_size));
+    block_sp = std::make_shared<AllocatedBlock>(addr, page_byte_size,
+                                                permissions, chunk_size);
     m_memory_map.insert(std::make_pair(permissions, block_sp));
   }
   return block_sp;

Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Mon Feb 11 15:13:08 2019
@@ -9,6 +9,7 @@
 #include <algorithm>
 #include <csignal>
 #include <fstream>
+#include <memory>
 #include <vector>
 
 #include "llvm/Support/FileSystem.h"
@@ -78,7 +79,7 @@ ConstString PlatformProperties::GetSetti
 }
 
 PlatformProperties::PlatformProperties() {
-  m_collection_sp.reset(new OptionValueProperties(GetSettingName()));
+  m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
   m_collection_sp->Initialize(g_properties);
 
   auto module_cache_dir = GetModuleCacheDirectory();

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Mon Feb 11 15:13:08 2019
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include <atomic>
+#include <memory>
 #include <mutex>
 
 #include "llvm/Support/ScopedPrinter.h"
@@ -163,15 +164,15 @@ ProcessProperties::ProcessProperties(lld
 {
   if (process == nullptr) {
     // Global process properties, set them up one time
-    m_collection_sp.reset(
-        new ProcessOptionValueProperties(ConstString("process")));
+    m_collection_sp =
+        std::make_shared<ProcessOptionValueProperties>(ConstString("process"));
     m_collection_sp->Initialize(g_properties);
     m_collection_sp->AppendProperty(
         ConstString("thread"), ConstString("Settings specific to threads."),
         true, Thread::GetGlobalProperties()->GetValueProperties());
   } else {
-    m_collection_sp.reset(
-        new ProcessOptionValueProperties(Process::GetGlobalProperties().get()));
+    m_collection_sp = std::make_shared<ProcessOptionValueProperties>(
+        Process::GetGlobalProperties().get());
     m_collection_sp->SetValueChangedCallback(
         ePropertyPythonOSPluginPath,
         ProcessProperties::OptionValueChangedCallback, this);
@@ -4670,7 +4671,8 @@ void Process::SetSTDIOFileDescriptor(int
       // Now read thread is set up, set up input reader.
 
       if (!m_process_input_reader)
-        m_process_input_reader.reset(new IOHandlerProcessSTDIO(this, fd));
+        m_process_input_reader =
+            std::make_shared<IOHandlerProcessSTDIO>(this, fd);
     }
   }
 }
@@ -5944,7 +5946,8 @@ ThreadCollectionSP Process::GetHistoryTh
     return threads;
   }
 
-  threads.reset(new ThreadCollection(memory_history->GetHistoryThreads(addr)));
+  threads = std::make_shared<ThreadCollection>(
+      memory_history->GetHistoryThreads(addr));
 
   return threads;
 }

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Mon Feb 11 15:13:08 2019
@@ -33,6 +33,8 @@
 
 #include "lldb/lldb-enumerations.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -422,7 +424,7 @@ VariableList *StackFrame::GetVariableLis
       const bool get_child_variables = true;
       const bool can_create = true;
       const bool stop_if_child_block_is_inlined_function = true;
-      m_variable_list_sp.reset(new VariableList());
+      m_variable_list_sp = std::make_shared<VariableList>();
       frame_block->AppendBlockVariables(can_create, get_child_variables,
                                         stop_if_child_block_is_inlined_function,
                                         [](Variable *v) { return true; },
@@ -1173,7 +1175,7 @@ ValueObjectSP StackFrame::TrackGlobalVar
     VariableList *var_list = GetVariableList(true);
     // If this frame has no variables, create a new list
     if (var_list == nullptr)
-      m_variable_list_sp.reset(new VariableList());
+      m_variable_list_sp = std::make_shared<VariableList>();
 
     // Add the global/static variable to this frame
     m_variable_list_sp->AddVariable(variable_sp);

Modified: lldb/trunk/source/Target/StackFrameList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrameList.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrameList.cpp (original)
+++ lldb/trunk/source/Target/StackFrameList.cpp Mon Feb 11 15:13:08 2019
@@ -24,6 +24,8 @@
 #include "lldb/Utility/Log.h"
 #include "llvm/ADT/SmallPtrSet.h"
 
+#include <memory>
+
 //#define DEBUG_STACK_FRAMES 1
 
 using namespace lldb;
@@ -465,9 +467,9 @@ void StackFrameList::GetFramesUpTo(uint3
             pc = reg_ctx_sp->GetPC();
           }
 
-          unwind_frame_sp.reset(new StackFrame(m_thread.shared_from_this(),
-                                               m_frames.size(), idx, reg_ctx_sp,
-                                               cfa, pc, nullptr));
+          unwind_frame_sp = std::make_shared<StackFrame>(
+              m_thread.shared_from_this(), m_frames.size(), idx, reg_ctx_sp,
+              cfa, pc, nullptr);
           m_frames.push_back(unwind_frame_sp);
         }
       } else {
@@ -483,9 +485,9 @@ void StackFrameList::GetFramesUpTo(uint3
         break;
       }
       const bool cfa_is_valid = true;
-      unwind_frame_sp.reset(
-          new StackFrame(m_thread.shared_from_this(), m_frames.size(), idx, cfa,
-                         cfa_is_valid, pc, StackFrame::Kind::Regular, nullptr));
+      unwind_frame_sp = std::make_shared<StackFrame>(
+          m_thread.shared_from_this(), m_frames.size(), idx, cfa, cfa_is_valid,
+          pc, StackFrame::Kind::Regular, nullptr);
 
       // Create synthetic tail call frames between the previous frame and the
       // newly-found frame. The new frame's index may change after this call,
@@ -663,9 +665,9 @@ StackFrameSP StackFrameList::GetFrameAtI
         addr_t pc, cfa;
         if (unwinder->GetFrameInfoAtIndex(idx, cfa, pc)) {
           const bool cfa_is_valid = true;
-          frame_sp.reset(new StackFrame(m_thread.shared_from_this(), idx, idx,
-                                        cfa, cfa_is_valid, pc,
-                                        StackFrame::Kind::Regular, nullptr));
+          frame_sp = std::make_shared<StackFrame>(
+              m_thread.shared_from_this(), idx, idx, cfa, cfa_is_valid, pc,
+              StackFrame::Kind::Regular, nullptr);
 
           Function *function =
               frame_sp->GetSymbolContext(eSymbolContextFunction).function;

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Mon Feb 11 15:13:08 2019
@@ -57,6 +57,8 @@
 #include "lldb/Utility/State.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/Timer.h"
+
+#include <memory>
 #include <mutex>
 
 using namespace lldb;
@@ -497,12 +499,13 @@ Target::GetSearchFilterForModule(const F
   if (containingModule != nullptr) {
     // TODO: We should look into sharing module based search filters
     // across many breakpoints like we do for the simple target based one
-    filter_sp.reset(
-        new SearchFilterByModule(shared_from_this(), *containingModule));
+    filter_sp = std::make_shared<SearchFilterByModule>(shared_from_this(),
+                                                       *containingModule);
   } else {
     if (!m_search_filter_sp)
-      m_search_filter_sp.reset(
-          new SearchFilterForUnconstrainedSearches(shared_from_this()));
+      m_search_filter_sp =
+          std::make_shared<SearchFilterForUnconstrainedSearches>(
+              shared_from_this());
     filter_sp = m_search_filter_sp;
   }
   return filter_sp;
@@ -514,12 +517,13 @@ Target::GetSearchFilterForModuleList(con
   if (containingModules && containingModules->GetSize() != 0) {
     // TODO: We should look into sharing module based search filters
     // across many breakpoints like we do for the simple target based one
-    filter_sp.reset(
-        new SearchFilterByModuleList(shared_from_this(), *containingModules));
+    filter_sp = std::make_shared<SearchFilterByModuleList>(shared_from_this(),
+                                                           *containingModules);
   } else {
     if (!m_search_filter_sp)
-      m_search_filter_sp.reset(
-          new SearchFilterForUnconstrainedSearches(shared_from_this()));
+      m_search_filter_sp =
+          std::make_shared<SearchFilterForUnconstrainedSearches>(
+              shared_from_this());
     filter_sp = m_search_filter_sp;
   }
   return filter_sp;
@@ -536,11 +540,11 @@ SearchFilterSP Target::GetSearchFilterFo
     // We could make a special "CU List only SearchFilter".  Better yet was if
     // these could be composable, but that will take a little reworking.
 
-    filter_sp.reset(new SearchFilterByModuleListAndCU(
-        shared_from_this(), FileSpecList(), *containingSourceFiles));
+    filter_sp = std::make_shared<SearchFilterByModuleListAndCU>(
+        shared_from_this(), FileSpecList(), *containingSourceFiles);
   } else {
-    filter_sp.reset(new SearchFilterByModuleListAndCU(
-        shared_from_this(), *containingModules, *containingSourceFiles));
+    filter_sp = std::make_shared<SearchFilterByModuleListAndCU>(
+        shared_from_this(), *containingModules, *containingSourceFiles);
   }
   return filter_sp;
 }
@@ -604,7 +608,8 @@ Target::CreateScriptedBreakpoint(const l
   } else if (has_modules) {
     filter_sp = GetSearchFilterForModuleList(containingModules);
   } else {
-    filter_sp.reset(new SearchFilterForUnconstrainedSearches(shared_from_this()));
+    filter_sp = std::make_shared<SearchFilterForUnconstrainedSearches>(
+        shared_from_this());
   }
   
   StructuredDataImpl *extra_args_impl = new StructuredDataImpl();
@@ -847,7 +852,7 @@ WatchpointSP Target::CreateWatchpoint(ll
   }
 
   if (!wp_sp) {
-    wp_sp.reset(new Watchpoint(*this, addr, size, type));
+    wp_sp = std::make_shared<Watchpoint>(*this, addr, size, type);
     wp_sp->SetWatchpointType(kind, notify);
     m_watchpoint_list.Add(wp_sp, true);
   }
@@ -1024,7 +1029,7 @@ Status Target::SerializeBreakpointsToFil
   }
 
   if (!break_store_ptr) {
-    break_store_sp.reset(new StructuredData::Array());
+    break_store_sp = std::make_shared<StructuredData::Array>();
     break_store_ptr = break_store_sp.get();
   }
 
@@ -2290,7 +2295,7 @@ ClangASTContext *Target::GetScratchClang
 ClangASTImporterSP Target::GetClangASTImporter() {
   if (m_valid) {
     if (!m_ast_importer_sp) {
-      m_ast_importer_sp.reset(new ClangASTImporter());
+      m_ast_importer_sp = std::make_shared<ClangASTImporter>();
     }
     return m_ast_importer_sp;
   }
@@ -3591,8 +3596,8 @@ TargetExperimentalProperties::TargetExpe
 TargetProperties::TargetProperties(Target *target)
     : Properties(), m_launch_info() {
   if (target) {
-    m_collection_sp.reset(
-        new TargetOptionValueProperties(target, Target::GetGlobalProperties()));
+    m_collection_sp = std::make_shared<TargetOptionValueProperties>(
+        target, Target::GetGlobalProperties());
 
     // Set callbacks to update launch_info whenever "settins set" updated any
     // of these properties
@@ -3640,8 +3645,8 @@ TargetProperties::TargetProperties(Targe
     DisableASLRValueChangedCallback(this, nullptr);
     DisableSTDIOValueChangedCallback(this, nullptr);
   } else {
-    m_collection_sp.reset(
-        new TargetOptionValueProperties(ConstString("target")));
+    m_collection_sp =
+        std::make_shared<TargetOptionValueProperties>(ConstString("target"));
     m_collection_sp->Initialize(g_properties);
     m_experimental_properties_up.reset(new TargetExperimentalProperties());
     m_collection_sp->AppendProperty(

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Mon Feb 11 15:13:08 2019
@@ -50,6 +50,8 @@
 #include "lldb/Utility/StreamString.h"
 #include "lldb/lldb-enumerations.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -121,12 +123,12 @@ public:
 
 ThreadProperties::ThreadProperties(bool is_global) : Properties() {
   if (is_global) {
-    m_collection_sp.reset(
-        new ThreadOptionValueProperties(ConstString("thread")));
+    m_collection_sp =
+        std::make_shared<ThreadOptionValueProperties>(ConstString("thread"));
     m_collection_sp->Initialize(g_properties);
   } else
-    m_collection_sp.reset(
-        new ThreadOptionValueProperties(Thread::GetGlobalProperties().get()));
+    m_collection_sp = std::make_shared<ThreadOptionValueProperties>(
+        Thread::GetGlobalProperties().get());
 }
 
 ThreadProperties::~ThreadProperties() = default;
@@ -1383,9 +1385,9 @@ ThreadPlanSP Thread::QueueThreadPlanForS
     const SymbolContext &addr_context, lldb::RunMode stop_other_threads,
     Status &status, LazyBool step_out_avoids_code_withoug_debug_info) {
   ThreadPlanSP thread_plan_sp;
-  thread_plan_sp.reset(new ThreadPlanStepOverRange(
+  thread_plan_sp = std::make_shared<ThreadPlanStepOverRange>(
       *this, range, addr_context, stop_other_threads,
-      step_out_avoids_code_withoug_debug_info));
+      step_out_avoids_code_withoug_debug_info);
 
   status = QueueThreadPlan(thread_plan_sp, abort_other_plans);
   return thread_plan_sp;
@@ -1603,7 +1605,8 @@ StackFrameListSP Thread::GetStackFrameLi
   if (m_curr_frames_sp) {
     frame_list_sp = m_curr_frames_sp;
   } else {
-    frame_list_sp.reset(new StackFrameList(*this, m_prev_frames_sp, true));
+    frame_list_sp =
+        std::make_shared<StackFrameList>(*this, m_prev_frames_sp, true);
     m_curr_frames_sp = frame_list_sp;
   }
   return frame_list_sp;

Modified: lldb/trunk/source/Target/ThreadPlanCallFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanCallFunction.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanCallFunction.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanCallFunction.cpp Mon Feb 11 15:13:08 2019
@@ -24,6 +24,8 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -404,8 +406,8 @@ void ThreadPlanCallFunction::DidPush() {
   GetThread().SetStopInfoToNothing();
 
 #ifndef SINGLE_STEP_EXPRESSIONS
-  m_subplan_sp.reset(
-      new ThreadPlanRunToAddress(m_thread, m_start_addr, m_stop_other_threads));
+  m_subplan_sp = std::make_shared<ThreadPlanRunToAddress>(
+      m_thread, m_start_addr, m_stop_other_threads);
 
   m_thread.QueueThreadPlan(m_subplan_sp, false);
   m_subplan_sp->SetPrivate(true);

Modified: lldb/trunk/source/Target/ThreadPlanStepOut.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOut.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanStepOut.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOut.cpp Mon Feb 11 15:13:08 2019
@@ -23,6 +23,8 @@
 #include "lldb/Target/ThreadPlanStepThrough.h"
 #include "lldb/Utility/Log.h"
 
+#include <memory>
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -84,9 +86,9 @@ ThreadPlanStepOut::ThreadPlanStepOut(
     if (frame_idx > 0) {
       // First queue a plan that gets us to this inlined frame, and when we get
       // there we'll queue a second plan that walks us out of this frame.
-      m_step_out_to_inline_plan_sp.reset(new ThreadPlanStepOut(
+      m_step_out_to_inline_plan_sp = std::make_shared<ThreadPlanStepOut>(
           m_thread, nullptr, false, stop_others, eVoteNoOpinion, eVoteNoOpinion,
-          frame_idx - 1, eLazyBoolNo, continue_to_next_branch));
+          frame_idx - 1, eLazyBoolNo, continue_to_next_branch);
       static_cast<ThreadPlanStepOut *>(m_step_out_to_inline_plan_sp.get())
           ->SetShouldStopHereCallbacks(nullptr, nullptr);
       m_step_out_to_inline_plan_sp->SetPrivate(true);
@@ -449,8 +451,9 @@ bool ThreadPlanStepOut::QueueInlinedStep
             m_stop_others ? lldb::eOnlyThisThread : lldb::eAllThreads;
         const LazyBool avoid_no_debug = eLazyBoolNo;
 
-        m_step_through_inline_plan_sp.reset(new ThreadPlanStepOverRange(
-            m_thread, inline_range, inlined_sc, run_mode, avoid_no_debug));
+        m_step_through_inline_plan_sp =
+            std::make_shared<ThreadPlanStepOverRange>(
+                m_thread, inline_range, inlined_sc, run_mode, avoid_no_debug);
         ThreadPlanStepOverRange *step_through_inline_plan_ptr =
             static_cast<ThreadPlanStepOverRange *>(
                 m_step_through_inline_plan_sp.get());

Modified: lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp Mon Feb 11 15:13:08 2019
@@ -12,6 +12,7 @@
 #include <dlfcn.h>
 
 #include <cinttypes>
+#include <memory>
 #include <mutex>
 #include <vector>
 
@@ -229,7 +230,7 @@ public:
                                        "missing from configuration.");
       return false;
     }
-    m_filter_chain_sp.reset(new LogFilterChain(filter_default_accept));
+    m_filter_chain_sp = std::make_shared<LogFilterChain>(filter_default_accept);
     DNBLogThreadedIf(LOG_DARWIN_LOG, "DarwinLog no-match rule: %s.",
                      filter_default_accept ? "accept" : "reject");
 
@@ -315,8 +316,8 @@ public:
         }
 
         // Create the filter.
-        filter_sp.reset(
-            new LogFilterExactMatch(filter_accepts, target_enum, exact_text));
+        filter_sp = std::make_shared<LogFilterExactMatch>(
+            filter_accepts, target_enum, exact_text);
       }
 
       // Add the filter to the chain.

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachThreadList.cpp Mon Feb 11 15:13:08 2019
@@ -12,13 +12,15 @@
 
 #include "MachThreadList.h"
 
-#include <inttypes.h>
-#include <sys/sysctl.h>
-
 #include "DNBLog.h"
 #include "DNBThreadResumeActions.h"
 #include "MachProcess.h"
 
+#include <inttypes.h>
+#include <sys/sysctl.h>
+
+#include <memory>
+
 MachThreadList::MachThreadList()
     : m_threads(), m_threads_mutex(PTHREAD_MUTEX_RECURSIVE),
       m_is_64_bit(false) {}
@@ -310,8 +312,8 @@ MachThreadList::UpdateThreadList(MachPro
           currThreads.push_back(thread_sp);
         } else {
           // We don't have this thread, lets add it.
-          thread_sp.reset(new MachThread(process, m_is_64_bit, unique_thread_id,
-                                         mach_port_num));
+          thread_sp = std::make_shared<MachThread>(
+              process, m_is_64_bit, unique_thread_id, mach_port_num);
 
           // Add the new thread regardless of its is user ready state...
           // Make sure the thread is ready to be displayed and shown to users

Modified: lldb/trunk/tools/debugserver/source/RNBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/RNBRemote.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/RNBRemote.cpp (original)
+++ lldb/trunk/tools/debugserver/source/RNBRemote.cpp Mon Feb 11 15:13:08 2019
@@ -45,6 +45,7 @@
 
 #include <TargetConditionals.h>
 #include <iomanip>
+#include <memory>
 #include <sstream>
 #include <unordered_set>
 
@@ -5227,7 +5228,7 @@ JSONGenerator::ObjectSP
 RNBRemote::GetJSONThreadsInfo(bool threads_with_valid_stop_info_only) {
   JSONGenerator::ArraySP threads_array_sp;
   if (m_ctx.HasValidProcessID()) {
-    threads_array_sp.reset(new JSONGenerator::Array());
+    threads_array_sp = std::make_shared<JSONGenerator::Array>();
 
     nub_process_t pid = m_ctx.ProcessID();
 

Modified: lldb/trunk/tools/debugserver/source/debugserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/debugserver.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/debugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/debugserver.cpp Mon Feb 11 15:13:08 2019
@@ -20,6 +20,8 @@
 #include <sys/sysctl.h>
 #include <sys/types.h>
 #include <sys/un.h>
+
+#include <memory>
 #include <vector>
 
 #if defined(__APPLE__)
@@ -937,7 +939,7 @@ int main(int argc, char *argv[]) {
   sigaddset(&sigset, SIGCHLD);
   sigprocmask(SIG_BLOCK, &sigset, NULL);
 
-  g_remoteSP.reset(new RNBRemote());
+  g_remoteSP = std::make_shared<RNBRemote>();
 
   RNBRemote *remote = g_remoteSP.get();
   if (remote == NULL) {

Modified: lldb/trunk/tools/debugserver/source/libdebugserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/libdebugserver.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/libdebugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/libdebugserver.cpp Mon Feb 11 15:13:08 2019
@@ -14,6 +14,8 @@
 #include <sys/sysctl.h>
 #include <sys/types.h>
 
+#include <memory>
+
 #include "DNB.h"
 #include "DNBLog.h"
 #include "DNBTimer.h"
@@ -338,7 +340,7 @@ extern "C" int debug_server_main(int fd)
 
   signal(SIGPIPE, signal_handler);
 
-  g_remoteSP.reset(new RNBRemote);
+  g_remoteSP = std::make_shared<RNBRemote>();
 
   RNBRemote *remote = g_remoteSP.get();
   if (remote == NULL) {

Modified: lldb/trunk/unittests/Editline/EditlineTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Editline/EditlineTest.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/unittests/Editline/EditlineTest.cpp (original)
+++ lldb/trunk/unittests/Editline/EditlineTest.cpp Mon Feb 11 15:13:08 2019
@@ -257,8 +257,8 @@ public:
       return;
 
     // Dump output.
-    _sp_output_thread.reset(
-        new std::thread([&] { _el_adapter.ConsumeAllOutput(); }));
+    _sp_output_thread =
+        std::make_shared<std::thread>([&] { _el_adapter.ConsumeAllOutput(); });
   }
 
   void TearDown() {

Modified: lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp?rev=353764&r1=353763&r2=353764&view=diff
==============================================================================
--- lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp (original)
+++ lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp Mon Feb 11 15:13:08 2019
@@ -10,6 +10,7 @@
 
 #include "gtest/gtest.h"
 
+#include <memory>
 #include <vector>
 
 #include "Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h"
@@ -2225,7 +2226,7 @@ TEST_F(Testx86AssemblyInspectionEngine,
   unwind_plan.SetPlanValidAddressRange(sample_range);
   unwind_plan.SetRegisterKind(eRegisterKindLLDB);
 
-  row_sp.reset(new UnwindPlan::Row);
+  row_sp = std::make_shared<UnwindPlan::Row>();
 
   // Describe offset 0
   row_sp->SetOffset(0);
@@ -2303,7 +2304,7 @@ TEST_F(Testx86AssemblyInspectionEngine,
   unwind_plan.SetPlanValidAddressRange(sample_range);
   unwind_plan.SetRegisterKind(eRegisterKindLLDB);
 
-  row_sp.reset(new UnwindPlan::Row);
+  row_sp = std::make_shared<UnwindPlan::Row>();
 
   // Describe offset 0
   row_sp->SetOffset(0);




More information about the lldb-commits mailing list