================ @@ -11,15 +11,19 @@ #include "lldb/Core/Debugger.h" #include "lldb/Utility/StreamString.h" +#include <optional> + using namespace lldb; using namespace lldb_private; std::atomic<uint64_t> Progress::g_id(0); -Progress::Progress(std::string title, uint64_t total, +Progress::Progress(std::string title, std::string details, + std::optional<uint64_t> total, lldb_private::Debugger *debugger) - : m_title(title), m_id(++g_id), m_completed(0), m_total(total) { - assert(total > 0); + : m_title(title), m_details(details), m_id(++g_id), m_completed(0), + m_total(total) { + assert(total == std::nullopt || total > 0); ---------------- clayborg wrote:
We need total to be non zero when there is no actual total: ``` m_total(1) { // Default to one if in case there is no valid total // Set the actual total if we have a valid value if (total) m_total = *total; ``` https://github.com/llvm/llvm-project/pull/77547 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits