For ATOMIC_READ, we don't need a special case to print VALUE_NONE,
because any action where the value isn't explicitly set (e.g., all
ATOMIC_READ actions) default to VALUE_NONE. And if this 'default'
changes in the future, we would want to print it.
(Right now it's confusing, for instance, when we have a failed promise
execution, since the model-checker trace gives no indication of what the
promised value actually *was*. This should be fixed sometime.)
type_str = "unknown type";
}
- uint64_t valuetoprint=type==ATOMIC_READ?(reads_from!=NULL?reads_from->value:VALUE_NONE):value;
+ uint64_t valuetoprint;
+ if (type == ATOMIC_READ && reads_from != NULL)
+ valuetoprint = reads_from->value;
+ else
+ valuetoprint = value;
switch (this->order) {
case std::memory_order_relaxed: