-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix opaque type substitution in the package cmo resilience domain #73794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix opaque type substitution in the package cmo resilience domain #73794
Conversation
@swift-ci test |
@@ -188,6 +189,20 @@ public func mainPubArgRetInlinable(_ arg: PubKlass) -> PubStruct { | |||
return PubStruct(arg.data) | |||
} | |||
|
|||
// CHECK-OPAQUE: sil @$s4Main023testPackageInSerializedC4FuncyyF : $@convention(thin) () -> () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Could you create a new test file for this, like package-cmo-opaque-type? This file already contains too much and is getting harder to track all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…nce domain rdar://128482863
bcd6f26
to
748b69d
Compare
@swift-ci test |
@swift-ci test |
// RUN: -module-name=Lib -package-name Pkg \ | ||
// RUN: -parse-as-library -emit-module -emit-module-path %t/Lib.swiftmodule -I%t \ | ||
// RUN: -Xfrontend -experimental-package-cmo -Xfrontend -experimental-allow-non-resilient-access \ | ||
// RUN: -O -wmo -enable-library-evolution -Xfrontend -disable-availability-checking |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw a proper diagnostics somewhere else so we don't need this -disable-availability-checking flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this flag is used out of convenience, without it availability annotations would have to be used (because of opaque result types).
…mo_opaque_type_subst Fix opaque type substitution in the package cmo resilience domain We need to serialize the underlying type if we want to see the underlying type accross the package resilience domain. rdar://128482863 (cherry picked from commit 58cc2a4) Risk: Low, should only affect package CMO mode rdar://128647016
We need to serialize the underlying type if we want to see the underlying type accross the package resilience domain.
rdar://128482863