From b1c73532ee8997fe5dfbeb7d223027bdf99758a0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 9 Dec 2023 14:28:42 +0100 Subject: Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1. --- lldb/source/Commands/CommandObjectStats.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'lldb/source/Commands/CommandObjectStats.cpp') diff --git a/lldb/source/Commands/CommandObjectStats.cpp b/lldb/source/Commands/CommandObjectStats.cpp index b0b497cd80ba..262de0bda144 100644 --- a/lldb/source/Commands/CommandObjectStats.cpp +++ b/lldb/source/Commands/CommandObjectStats.cpp @@ -26,15 +26,14 @@ public: ~CommandObjectStatsEnable() override = default; protected: - bool DoExecute(Args &command, CommandReturnObject &result) override { + void DoExecute(Args &command, CommandReturnObject &result) override { if (DebuggerStats::GetCollectingStats()) { result.AppendError("statistics already enabled"); - return false; + return; } DebuggerStats::SetCollectingStats(true); result.SetStatus(eReturnStatusSuccessFinishResult); - return true; } }; @@ -48,15 +47,14 @@ public: ~CommandObjectStatsDisable() override = default; protected: - bool DoExecute(Args &command, CommandReturnObject &result) override { + void DoExecute(Args &command, CommandReturnObject &result) override { if (!DebuggerStats::GetCollectingStats()) { result.AppendError("need to enable statistics before disabling them"); - return false; + return; } DebuggerStats::SetCollectingStats(false); result.SetStatus(eReturnStatusSuccessFinishResult); - return true; } }; @@ -105,7 +103,7 @@ public: Options *GetOptions() override { return &m_options; } protected: - bool DoExecute(Args &command, CommandReturnObject &result) override { + void DoExecute(Args &command, CommandReturnObject &result) override { Target *target = nullptr; if (!m_options.m_all_targets) target = m_exe_ctx.GetTargetPtr(); @@ -113,7 +111,6 @@ protected: result.AppendMessageWithFormatv( "{0:2}", DebuggerStats::ReportStatistics(GetDebugger(), target)); result.SetStatus(eReturnStatusSuccessFinishResult); - return true; } CommandOptions m_options; -- cgit v1.3