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/Commands/CommandObjectWatchpointCommand.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lldb/source/Commands/CommandObjectWatchpointCommand.cpp') diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp index 507ef3f..32cb80b4 100644 --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -252,10 +252,8 @@ are no syntax errors may indicate that a function was declared but never called. // Rig up the results secondary output stream to the debugger's, so the // output will come out synchronously if the debugger is set up that // way. - StreamSP output_stream(debugger.GetAsyncOutputStream()); - StreamSP error_stream(debugger.GetAsyncErrorStream()); - result.SetImmediateOutputStream(output_stream); - result.SetImmediateErrorStream(error_stream); + result.SetImmediateOutputStream(debugger.GetAsyncOutputStream()); + result.SetImmediateErrorStream(debugger.GetAsyncErrorStream()); CommandInterpreterRunOptions options; options.SetStopOnContinue(true); -- cgit v1.1