mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
cross-module-optimization: Don't serialize functions which reference implementationOnly-imported functions
The check for implementationOnly imports was already done for types, but it was missing for functions. Fixes a crash when implementationOnly-importing a C module. https://bugs.swift.org/browse/SR-15048 rdar://81701218
This commit is contained in:
@@ -676,9 +676,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;
|
||||
/// Returns true if decl context or its content can be serialized by
|
||||
/// cross-module-optimization.
|
||||
/// The \p ctxt can e.g. be a NominalType or the context of a function.
|
||||
bool canBeUsedForCrossModuleOptimization(DeclContext *ctxt) const;
|
||||
|
||||
/// Finds all top-level decls of this module.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user