Commit Graph

1 Commits

Author SHA1 Message Date
Egor Zhdan
e6b830b640 [cxx-interop] Import CF_OPTIONS types such as Foundation.NSTextCheckingType correctly
This fixes linker errors which occurred when using Foundation extensions to `Swift.String`, such as `func replacingOccurrences`.

After the last rebranch, Clang started wrapping certain types in `clang::ElaboratedType`. This caused CF_OPTIONS types such as `Foundation.NSTextCheckingType` to be imported incorrectly in C++ language mode (`NSTextCheckingType` was imported as `uint64_t` without getting the special treatment of a CF type), which was causing deserialization errors when Swift tried reading `Foundation.swiftmodule`. Those deserialization errors were silenced by default. The IR for those functions was not emitted, which caused linker errors later.

rdar://109830032
2023-07-14 17:51:49 +01:00