mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
CrossModuleOptimization: fix crash when importing a module as implementationOnly
If a function uses a type imported as implementationOnly (or similar), it cannot be serialized. I added a new API in ModuleDecl (canBeUsedForCrossModuleOptimization), which performs this check. rdar://72864719
This commit is contained in:
@@ -626,6 +626,10 @@ public:
|
||||
/// This assumes that \p module was imported.
|
||||
bool isImportedImplementationOnly(const ModuleDecl *module) const;
|
||||
|
||||
/// Returns true if a function, which is using \p nominal, can be serialized
|
||||
/// by cross-module-optimization.
|
||||
bool canBeUsedForCrossModuleOptimization(NominalTypeDecl *nominal) const;
|
||||
|
||||
/// Finds all top-level decls of this module.
|
||||
///
|
||||
/// This does a simple local lookup, not recursively looking through imports.
|
||||
|
||||
Reference in New Issue
Block a user