Skip to content

Commit ec2e575

Browse files
committed
[NFC] PrunedLiveness: Use std::min.
1 parent adf1101 commit ec2e575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/SIL/PrunedLiveness.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class PrunedLiveness {
399399
: value(lifetimeEnding ? Value::Ending : Value::NonEnding) {}
400400
operator Value() const { return value; }
401401
LifetimeEnding meet(LifetimeEnding const other) const {
402-
return value < other.value ? *this : other;
402+
return std::min(value, other.value);
403403
}
404404
void meetInPlace(LifetimeEnding const other) { *this = meet(other); }
405405
bool isEnding() const { return value == Value::Ending; }

0 commit comments

Comments
 (0)