[all-commits] [llvm/llvm-project] 733b86: [lldb][progress] Correctly check total for determi...

Chelsea Cassanova via All-commits all-commits at lists.llvm.org
Tue Jan 30 12:00:50 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 733b86d3ff8087f1e267c23eb315bb16e3c6c953
      https://github.com/llvm/llvm-project/commit/733b86d3ff8087f1e267c23eb315bb16e3c6c953
  Author: Chelsea Cassanova <chelsea_cassanova at apple.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M lldb/include/lldb/Core/DebuggerEvents.h
    M lldb/include/lldb/Core/Progress.h
    M lldb/source/Core/DebuggerEvents.cpp
    M lldb/source/Core/Progress.cpp

  Log Message:
  -----------
  [lldb][progress] Correctly check total for deterministic progress (#79912)

The `total` parameter for the constructor for Progress was changed to a
std::optional in https://github.com/llvm/llvm-project/pull/77547. It was originally set to 1 to indicate non-determinisitic progress, but this commit changes this. First, `UINT64_MAX` will again be used for non-deterministic progress, and `Progress` now has a static variable set to this value so that we can use this instead of a magic number. 

The member variable `m_total` could be changed to a std::optional as
well, but this means that the `ProgressEventData::GetTotal()` (which is
used for the public API) would
either need to return a std::optional value or it would return some
specific integer to represent non-deterministic progress if `m_total` is
std::nullopt.




More information about the All-commits mailing list