[Lldb-commits] [lldb] [lldb][Progress] Separate title and details (PR #77547)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 10 13:08:35 PST 2024


================
@@ -96,13 +97,14 @@ class Progress {
   static std::atomic<uint64_t> g_id;
   /// The title of the progress activity.
   std::string m_title;
+  std::string m_details;
   std::mutex m_mutex;
   /// A unique integer identifier for progress reporting.
   const uint64_t m_id;
   /// How much work ([0...m_total]) that has been completed.
   uint64_t m_completed;
-  /// Total amount of work, UINT64_MAX for non deterministic progress.
-  const uint64_t m_total;
+  /// Total amount of work, use a std::nullopt for non deterministic progress.
+  const std::optional<uint64_t> m_total;
----------------
clayborg wrote:

We need to leave this as a `uint64_t` so that we can report progress start events and end events correctly. See comments in `Progress::ReportProgress(...)`. We need `total` to be reported as non-zero as the end events are considered a notification where `completed == total`

https://github.com/llvm/llvm-project/pull/77547


More information about the lldb-commits mailing list