mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
During Package CMO, SIL cloning happens during which
SILOptions::EnableSerializePackage info is lost. SILVerifier needs this info to determine whether resilience can be bypassed for decls serialized in a resiliently built module when Package CMO optimization enabled. This PR adds SerializePackageEnabled bit to Module format and uses that in SILVerifier. Resolves rdar://126157356
This commit is contained in:
@@ -721,6 +721,16 @@ public:
|
||||
Bits.ModuleDecl.AllowNonResilientAccess = flag;
|
||||
}
|
||||
|
||||
/// Returns true if -experimental-package-cmo was passed, which
|
||||
/// enables serialization of package, public, and inlinable decls in a
|
||||
/// package. This requires -experimental-allow-non-resilient-access.
|
||||
bool serializePackageEnabled() const {
|
||||
return Bits.ModuleDecl.SerializePackageEnabled;
|
||||
}
|
||||
void setSerializePackageEnabled(bool flag = true) {
|
||||
Bits.ModuleDecl.SerializePackageEnabled = flag;
|
||||
}
|
||||
|
||||
/// Returns true if this module is a non-Swift module that was imported into
|
||||
/// Swift.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user