Commit Graph

5 Commits

Author SHA1 Message Date
Alex Lorenz
9c44e01e07 [cxx-interop][stdlib] windows - use new hash inline functions like other platforms
The PR https://github.com/swiftlang/swift/pull/77857 added windows-specific workaround for https://github.com/swiftlang/swift/issues/77856, that happened after https://github.com/swiftlang/swift/pull/77843. Unfortunately this caused a new issue on windows - https://github.com/swiftlang/swift/issues/78119. It looks like windows is suffering from a similar serialization issue as libstdc++, although its even more complex as the callAsFunction is not only a derived function from a base class, the base class although has a static call operator. In any case, the libstdc++ callAsFunction deserialization fix should align with the static operator () deserialization too, so for now make windows use the same workaround as other platforms to avoid the deserialization crash (77856).

This change was tested on i686 windows too, ensuring that IR verifier crash no longer happens
2024-12-12 23:17:17 -08:00
Egor Zhdan
c57756168f [cxx-interop] Workaround a deserialization error for CxxStdlib on Linux
In certain versions of libstdc++, `std::hash<std::string>` defines `operator()` in a base class. It looks like Swift is not correctly deserializing an inherited `operator()` for inlinable functions. This change sidesteps the issue by moving the call to `callAsFunction`/`operator()` to the C++ shim layer.

rdar://140358388
2024-11-26 16:27:05 +00:00
Egor Zhdan
53fb6531f2 [cxx-interop] Add conversions between std::chrono::duration and Swift.Duration
rdar://123696734
2024-03-01 13:15:05 +00:00
Crazy凡
02a9259dda [cxx-interop] Provide similar support for std::u32string as std::string and std::u16string. 2023-10-10 16:01:15 +08:00
Egor Zhdan
242a432919 [cxx-interop] Conform std::string to Hashable
rdar://107709149
2023-04-06 16:15:40 +01:00