From 78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 20 Feb 2025 11:13:46 -0800 Subject: [lldb] Store StreamAsynchronousIO in a unique_ptr (NFC) (#127961) Make StreamAsynchronousIO an unique_ptr instead of a shared_ptr. I tried passing the class by value, but the llvm::raw_ostream forwarder stored in the Stream parent class isn't movable and I don't think it's worth changing that. Additionally, there's a few places that expect a StreamSP, which are easily created from a StreamUP. --- lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index f365951..8a8c0f92 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -5495,8 +5495,7 @@ public: if (process) { StreamSP output_stream_sp = result.GetImmediateOutputStream(); if (!output_stream_sp) - output_stream_sp = - StreamSP(m_interpreter.GetDebugger().GetAsyncOutputStream()); + output_stream_sp = m_interpreter.GetDebugger().GetAsyncOutputStream(); result.SetImmediateOutputStream(output_stream_sp); const uint32_t num_packets = -- cgit v1.1