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

via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 28 10:45:06 PST 2023


Author: Chelsea Cassanova
Date: 2023-11-28T10:45:02-08:00
New Revision: c846f8ba104f18053ce666de7e2da0a82deb45cd

URL: https://github.com/llvm/llvm-project/commit/c846f8ba104f18053ce666de7e2da0a82deb45cd
DIFF: https://github.com/llvm/llvm-project/commit/c846f8ba104f18053ce666de7e2da0a82deb45cd.diff

LOG: [lldb][progress] Always report progress upon Progress object destruction (#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.

Added: 
    

Modified: 
    lldb/source/Core/Progress.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/Progress.cpp b/lldb/source/Core/Progress.cpp
index 08be73f1470f349..ea3f874916a999f 100644
--- a/lldb/source/Core/Progress.cpp
+++ b/lldb/source/Core/Progress.cpp
@@ -30,10 +30,9 @@ Progress::~Progress() {
   // Make sure to always report progress completed when this object is
   // destructed so it indicates the progress dialog/activity should go away.
   std::lock_guard<std::mutex> guard(m_mutex);
-  if (!m_completed) {
+  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