File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1514,8 +1514,16 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
1514
1514
continue ;
1515
1515
}
1516
1516
1517
- if (dependency.isImplementationOnly () && !treatAsPartialModule)
1517
+ if (dependency.isImplementationOnly () &&
1518
+ !(treatAsPartialModule || ctx.LangOpts .DebuggerSupport )) {
1519
+ // When building normally (and not merging partial modules), we don't
1520
+ // want to bring in the implementation-only module, because that might
1521
+ // change the set of visible declarations. However, when debugging we
1522
+ // want to allow getting at the internals of this module when possible,
1523
+ // and so we'll try to reference the implementation-only module if it's
1524
+ // available.
1518
1525
continue ;
1526
+ }
1519
1527
1520
1528
StringRef modulePathStr = dependency.RawPath ;
1521
1529
StringRef scopePath;
@@ -1544,7 +1552,8 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
1544
1552
1545
1553
// Otherwise, continue trying to load dependencies, so that we can list
1546
1554
// everything that's missing.
1547
- missingDependency = true ;
1555
+ if (!(dependency.isImplementationOnly () && ctx.LangOpts .DebuggerSupport ))
1556
+ missingDependency = true ;
1548
1557
continue ;
1549
1558
}
1550
1559
You can’t perform that action at this time.
0 commit comments