Skip to content

Commit 35ff605

Browse files
authored
Merge pull request swiftlang#59955 from xymus/force-objc-import-publicly
[Sema] Force considering the `__ObjC` module as imported publicly
2 parents 2d87478 + 82e9380 commit 35ff605

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/AST/Module.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,6 +2467,9 @@ RestrictedImportKind SourceFile::getRestrictedImportKind(const ModuleDecl *modul
24672467
auto &imports = getASTContext().getImportCache();
24682468
RestrictedImportKind importKind = RestrictedImportKind::Implicit;
24692469

2470+
if (module->getName().str() == CLANG_HEADER_MODULE_NAME)
2471+
return RestrictedImportKind::None;
2472+
24702473
// Look at the imports of this source file.
24712474
for (auto &desc : *Imports) {
24722475
// Ignore implementation-only imports.

0 commit comments

Comments
 (0)