mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ScanDependencies] Do not count optional dependencies when not needed
If a testable module is loaded from a non-testable import, ignore its optional dependencies because the consumer should not use them. This matches the behavior of the implicit build or the behavior how forwarding module is created.
This commit is contained in:
@@ -174,7 +174,7 @@ protected:
|
||||
static BinaryModuleImports
|
||||
getImportsOfModule(const ModuleFileSharedCore &loadedModule,
|
||||
ModuleLoadingBehavior transitiveBehavior,
|
||||
StringRef packageName);
|
||||
StringRef packageName, bool isTestableImport);
|
||||
|
||||
/// Load the module file into a buffer and also collect its module name.
|
||||
static std::unique_ptr<llvm::MemoryBuffer>
|
||||
|
||||
Reference in New Issue
Block a user