diff --git a/stdlib/public/Cxx/std/String.swift b/stdlib/public/Cxx/std/String.swift index 3d379e81cd17b..1963aa610cebc 100644 --- a/stdlib/public/Cxx/std/String.swift +++ b/stdlib/public/Cxx/std/String.swift @@ -198,7 +198,11 @@ extension std.string: Hashable { @_alwaysEmitIntoClient public func hash(into hasher: inout Hasher) { // Call std::hash::operator() +#if os(Windows) // FIXME: https://github.com/swiftlang/swift/issues/77856 + let cxxHash = __swift_interopHashOfString().callAsFunction(self) +#else let cxxHash = __swift_interopComputeHashOfString(self) +#endif hasher.combine(cxxHash) } } @@ -207,7 +211,11 @@ extension std.u16string: Hashable { @_alwaysEmitIntoClient public func hash(into hasher: inout Hasher) { // Call std::hash::operator() +#if os(Windows) // FIXME: https://github.com/swiftlang/swift/issues/77856 + let cxxHash = __swift_interopHashOfU16String().callAsFunction(self) +#else let cxxHash = __swift_interopComputeHashOfU16String(self) +#endif hasher.combine(cxxHash) } } @@ -216,7 +224,11 @@ extension std.u32string: Hashable { @_alwaysEmitIntoClient public func hash(into hasher: inout Hasher) { // Call std::hash::operator() +#if os(Windows) // FIXME: https://github.com/swiftlang/swift/issues/77856 + let cxxHash = __swift_interopHashOfU32String().callAsFunction(self) +#else let cxxHash = __swift_interopComputeHashOfU32String(self) +#endif hasher.combine(cxxHash) } }