aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectStats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectStats.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectStats.cpp13
1 files changed, 5 insertions, 8 deletions
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;