File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -420,14 +420,18 @@ llvm::ErrorOr<ModuleDependencyInfo> SerializedModuleLoaderBase::scanModuleFile(
420
420
if (dependency.isHeader ())
421
421
continue ;
422
422
423
- // Transitive @_implementationOnly dependencies of
424
- // binary modules are not required to be imported during normal builds
425
- // TODO: This is worth revisiting for debugger purposes
426
- if (dependency.isImplementationOnly ())
427
- continue ;
428
-
429
- if (dependency.isPackageOnly () &&
430
- Ctx.LangOpts .PackageName != loadedModuleFile->getModulePackageName ())
423
+ // Some transitive dependencies of binary modules are not required to be
424
+ // imported during normal builds.
425
+ // TODO: This is worth revisiting for debugger purposes where
426
+ // loading the module is optional, and implementation-only imports
427
+ // from modules with testing enabled where the dependency is
428
+ // optional.
429
+ ModuleLoadingBehavior transitiveBehavior =
430
+ loadedModuleFile->getTransitiveLoadingBehavior (dependency,
431
+ /* debuggerMode*/ false ,
432
+ /* isPartialModule*/ false ,
433
+ /* package*/ Ctx.LangOpts .PackageName );
434
+ if (transitiveBehavior != ModuleLoadingBehavior::Required)
431
435
continue ;
432
436
433
437
// Find the top-level module name.
You can’t perform that action at this time.
0 commit comments