================
@@ -39,7 +39,7 @@ class ProgressEventData : public EventData {
GetAsStructuredData(const Event *event_ptr);
uint64_t GetID() const { return m_id; }
- bool IsFinite() const { return m_total != UINT64_MAX; }
+ bool IsFinite() const { return m_total != 1; }
----------------
clayborg wrote:
It would be nice to actually hard code a constant value inside the progress
class and use it. We are using magic numbers.
```
class Progress {
constexpr uint64_t kNonDeterministicTotal = UINT64_MAX;
```
I was also thinking that UINT64_MAX might be a better value to use than 1
because people can create valid deterministic Progress with 1 work item. So
this code would be:
```
bool IsFinite() const { return m_total != kNonDeterministicTotal; }
```
https://github.com/llvm/llvm-project/pull/79912
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits