Skip to content

Commit ac81225

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents 41b81bc + 6b07132 commit ac81225

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,9 @@ void ABIDependencyEvaluator::computeABIDependenciesForClangModule(
589589
}
590590
if (import->isNonSwiftModule()
591591
&& module->getTopLevelModule() == import->getTopLevelModule()
592-
&& !import->findUnderlyingClangModule()
593-
->isSubModuleOf(module->findUnderlyingClangModule())) {
592+
&& (module == import
593+
|| !import->findUnderlyingClangModule()
594+
->isSubModuleOf(module->findUnderlyingClangModule()))) {
594595
continue;
595596
}
596597
computeABIDependenciesForModule(import);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Outer {
2+
module Inner {
3+
export Outer.Inner
4+
}
5+
export Outer
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Check that this doesn't crash due to a self-cycle. rdar://67435472
2+
// RUN: %target-swift-frontend %s -emit-module -o /dev/null -emit-loaded-module-trace-path /dev/null -I %S/Inputs/imported_modules/SelfImport
3+
4+
import Outer

0 commit comments

Comments
 (0)