[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.
This commit is contained in:
Chelsea Cassanova 2023-11-28 13:45:02 -05:00 committed by GitHub
parent 98e674c9f1
commit c846f8ba10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {