[Lldb-commits] [lldb] [lldb][progress] Always report progress upon Progress object destruction (PR #73605)

Chelsea Cassanova via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 27 18:08:44 PST 2023


https://github.com/chelcassanova created https://github.com/llvm/llvm-project/pull/73605

This commit allows a final progress report upon the destruction of the `Progress` object to happen at all times as opposed to when the progress was not completed.

>From 8c29a2034a57174ec68f8c1f1a2c5c66a7988762 Mon Sep 17 00:00:00 2001
From: Chelsea Cassanova <chelsea_cassanova at apple.com>
Date: Mon, 27 Nov 2023 15:42:13 -0800
Subject: [PATCH] [lldb][progress] Always report progress upon Progress object
 destruction

This commit allows a final progress report upon the destruction of the
`Progress` object to happen at all times as opposed to when the progress
was not completed
---
 lldb/source/Core/Progress.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/source/Core/Progress.cpp b/lldb/source/Core/Progress.cpp
index 08be73f1470f349..eee4d3955154ba9 100644
--- a/lldb/source/Core/Progress.cpp
+++ b/lldb/source/Core/Progress.cpp
@@ -32,8 +32,8 @@ Progress::~Progress() {
   std::lock_guard<std::mutex> guard(m_mutex);
   if (!m_completed) {
     m_completed = m_total;
-    ReportProgress();
   }
+  ReportProgress();
 }
 
 void Progress::Increment(uint64_t amount, std::string update) {



More information about the lldb-commits mailing list