Skip to content

Commit 23a4d2b

Browse files
authored
Merge pull request swiftlang#63349 from aschwaighofer/fix_anyhashable_rpwt
Fix AnyHashableSupport.cpp for SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES
2 parents bbda52f + d5965d0 commit 23a4d2b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/runtime/AnyHashableSupport.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,12 @@ findHashableBaseTypeImpl(const Metadata *type) {
9898
return nullptr;
9999
}
100100
// By this point, `type` is known to conform to `Hashable`.
101+
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES
102+
const auto *conformance = reinterpret_cast<const RelativeWitnessTable*>(
103+
witnessTable)->getDescription();
104+
#else
101105
const auto *conformance = witnessTable->getDescription();
106+
#endif
102107
const Metadata *baseTypeThatConformsToHashable =
103108
findConformingSuperclass(type, conformance);
104109
HashableConformanceKey key{type};

0 commit comments

Comments
 (0)