mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -707,6 +707,11 @@ public:
|
||||
/// \c true if this module was built with strict memory safety.
|
||||
bool strictMemorySafety() const { return Core->strictMemorySafety(); }
|
||||
|
||||
/// \c true if this module was built with `ExtensibleEnums` feature enabled.
|
||||
bool supportsExtensibleEnums() const {
|
||||
return Core->supportsExtensibleEnums();
|
||||
}
|
||||
|
||||
/// Associates this module file with the AST node representing it.
|
||||
///
|
||||
/// Checks that the file is compatible with the AST module it's being loaded
|
||||
|
||||
Reference in New Issue
Block a user