mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Serialization] Support Swift only system module
Previously 'isSystemModule()' returns true only if the module is: - Standard library - Clang module and that is `IsSystem` - Swift overlay for clang `IsSystem` module Now: - Clang module and that is `IsSystem`; or - Swift overlay for clang `IsSystem` module - Swift module found in either of these directories: - Runtime library directoris (including stdlib) - Frameworks in `-Fsystem` directories - Frameworks in `$SDKROOT/System/Library/Frameworks/` (Darwin) - Frameworks in `$SDKROOT/Library/Frameworks/` (Darwin) rdar://problem/50516314
This commit is contained in:
@@ -325,6 +325,15 @@ public:
|
||||
Bits.ModuleDecl.RawResilienceStrategy = unsigned(strategy);
|
||||
}
|
||||
|
||||
/// \returns true if this module is a system module; note that the StdLib is
|
||||
/// considered a system module.
|
||||
bool isSystemModule() const {
|
||||
return Bits.ModuleDecl.IsSystemModule;
|
||||
}
|
||||
void setIsSystemModule(bool flag = true) {
|
||||
Bits.ModuleDecl.IsSystemModule = flag;
|
||||
}
|
||||
|
||||
bool isResilient() const {
|
||||
return getResilienceStrategy() != ResilienceStrategy::Default;
|
||||
}
|
||||
@@ -553,10 +562,6 @@ public:
|
||||
/// \returns true if this module is the "SwiftOnoneSupport" module;
|
||||
bool isOnoneSupportModule() const;
|
||||
|
||||
/// \returns true if this module is a system module; note that the StdLib is
|
||||
/// considered a system module.
|
||||
bool isSystemModule() const;
|
||||
|
||||
/// \returns true if traversal was aborted, false otherwise.
|
||||
bool walk(ASTWalker &Walker);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user