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/CommandObjectCommands.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lldb/source/Commands/CommandObjectCommands.cpp') diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index dd841cb..9510cf4 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -815,10 +815,9 @@ protected: for (const std::string &line : lines) { Status error = AppendRegexSubstitution(line, check_only); if (error.Fail()) { - if (!GetDebugger().GetCommandInterpreter().GetBatchCommandMode()) { - StreamSP out_stream = GetDebugger().GetAsyncOutputStream(); - out_stream->Printf("error: %s\n", error.AsCString()); - } + if (!GetDebugger().GetCommandInterpreter().GetBatchCommandMode()) + GetDebugger().GetAsyncOutputStream()->Printf("error: %s\n", + error.AsCString()); } } } -- cgit v1.1