swift
fe6ccd7a - [cxx-interop] Add fix for corner case where NS_OPTIONS typedef has to be desugared

Commit
2 years ago
[cxx-interop] Add fix for corner case where NS_OPTIONS typedef has to be desugared This patch is an add-on to https://github.com/apple/swift/pull/64043. Essentially when encountering NS_OPTIONS enums, in C++-Interop mode if they are not specially handled then they can mangle differently than they do without C++-Interop. This patch adds logic to handle when a typedef and enum have additional clang::ElaboratedType sugar, but otherwise it does the same as the existing 64043 patch. The test case provided was encountered in a real app build. The problem came from when two modules are each compiled one with and one without C++-Interop. For the test case code provided the mangling of the protocol conformance is not consistent and the code in SILGenLazyConformance.cpp crashes on an invalid conformance with reason "Invalid conformance in type-checked AST".
Author
Committer
Parents
Loading