Make SwiftValue == support unconditional

PR #71620 made this behavior conditional as a way to help
provide binary compatibility for legacy software that might
be relying on the old behavior.

So far, it appears the only such problems arose from the
SwiftObject behavior changes, not from SwiftValue behavior.
So let's optimistically back this out and make the new behavior
unconditional.

Resolves rdar://127839540
This commit is contained in:
Tim Kientzle
2024-05-09 14:38:36 -07:00
parent b421b1a2c2
commit cb03a459fe

View File

@@ -430,10 +430,10 @@ swift::findSwiftValueConformances(const ExistentialTypeMetadata *existentialType
}
}
if (runtime::bincompat::useLegacySwiftObjCHashing()) {
// Legacy behavior only proxies isEqual: for Hashable, not Equatable
return NO;
}
// if (runtime::bincompat::useLegacySwiftObjCHashing()) {
// // Legacy behavior only proxies isEqual: for Hashable, not Equatable
// return NO;
// }
if (auto equatableConformance = selfHeader->getEquatableConformance()) {
if (auto selfEquatableBaseType = selfHeader->getEquatableBaseType()) {
@@ -464,10 +464,10 @@ swift::findSwiftValueConformances(const ExistentialTypeMetadata *existentialType
selfHeader->type, hashableConformance);
}
if (runtime::bincompat::useLegacySwiftObjCHashing()) {
// Legacy behavior doesn't honor Equatable conformance, only Hashable
return (NSUInteger)self;
}
// if (runtime::bincompat::useLegacySwiftObjCHashing()) {
// // Legacy behavior doesn't honor Equatable conformance, only Hashable
// return (NSUInteger)self;
// }
// If Swift type is Equatable but not Hashable,
// we have to return something here that is compatible