mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Serialization] Serialize a flag that indicates whether ExtensibleEnum feature is supported by a module
When `ExtensibleEnums` flag is set, it's going to be reflected in the module file produced by the compiler to make sure that consumers know that non-`@frozen` enumerations can gain new cases in the future and switching cannot be exhaustive.
This commit is contained in:
@@ -1090,6 +1090,8 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
|
||||
if (!loadedModuleFile->getModulePackageName().empty()) {
|
||||
M.setPackageName(Ctx.getIdentifier(loadedModuleFile->getModulePackageName()));
|
||||
}
|
||||
if (loadedModuleFile->supportsExtensibleEnums())
|
||||
M.setSupportsExtensibleEnums();
|
||||
M.setUserModuleVersion(loadedModuleFile->getUserModuleVersion());
|
||||
M.setSwiftInterfaceCompilerVersion(
|
||||
loadedModuleFile->getSwiftInterfaceCompilerVersion());
|
||||
|
||||
Reference in New Issue
Block a user