aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2025-02-20 11:13:46 -0800
committerGitHub <noreply@github.com>2025-02-20 11:13:46 -0800
commit78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc (patch)
tree1b99cd3d655c9c3b6b30f195e97d43ea3f7221e4 /lldb/source/Commands/CommandObjectCommands.cpp
parent6d84fae60ed2c227dfcb349a144cbc0cdd3bcc4b (diff)
downloadllvm-78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc.zip
llvm-78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc.tar.gz
llvm-78d82d3ae7ac99833e1b9c0b529c256f90b6c6cc.tar.bz2
[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.
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp7
1 files changed, 3 insertions, 4 deletions
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());
}
}
}