File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1923,15 +1923,11 @@ ImportedModule::removeDuplicates(SmallVectorImpl<ImportedModule> &imports) {
1923
1923
}
1924
1924
1925
1925
Identifier ModuleDecl::getPublicModuleName (bool onlyIfImported) const {
1926
- if (!PublicModuleName.empty ()) {
1927
- if (!onlyIfImported)
1928
- return PublicModuleName;
1926
+ if (!PublicModuleName.empty () &&
1927
+ (!onlyIfImported ||
1928
+ getASTContext ().getLoadedModule (PublicModuleName)))
1929
+ return PublicModuleName;
1929
1930
1930
- bool publicModuleIsImported =
1931
- getASTContext ().getModuleByIdentifier (PublicModuleName);
1932
- if (publicModuleIsImported)
1933
- return PublicModuleName;
1934
- }
1935
1931
return getName ();
1936
1932
}
1937
1933
Original file line number Diff line number Diff line change 47
47
// RUN: -verify
48
48
// RUN: not %target-swift-frontend -typecheck %t/ClientMiddle.swift -o %t -I %t \
49
49
// RUN: -enable-library-evolution -swift-version 6 \
50
+ // RUN: -diagnostic-style llvm \
50
51
// RUN: 2>&1 | %FileCheck %t/ClientMiddle.swift
51
52
52
53
/// Test more diagnostics referencing modules.
69
70
// RUN: -verify
70
71
// RUN: not %target-swift-frontend -typecheck %t/ClientMiddle.swift -o %t -I %t \
71
72
// RUN: -enable-library-evolution -swift-version 6 \
73
+ // RUN: -diagnostic-style llvm \
72
74
// RUN: 2>&1 | %FileCheck %t/ClientMiddle.swift
73
75
74
76
// RUN: %target-swift-frontend -typecheck %t/ClientAccessLevelOnImports.swift -o %t -I %t \
You can’t perform that action at this time.
0 commit comments