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:
Ellie Shin
2024-04-17 22:16:18 -07:00
parent 4b440a1d80
commit fbb3382e21
13 changed files with 304 additions and 54 deletions

View File

@@ -923,6 +923,8 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
M.setIsBuiltFromInterface();
if (loadedModuleFile->allowNonResilientAccess())
M.setAllowNonResilientAccess();
if (loadedModuleFile->serializePackageEnabled())
M.setSerializePackageEnabled();
if (!loadedModuleFile->getModuleABIName().empty())
M.setABIName(Ctx.getIdentifier(loadedModuleFile->getModuleABIName()));
if (loadedModuleFile->isConcurrencyChecked())