Skip to content

Commit d628734

Browse files
committed
[Sema] Special case the bridging header module to consider it as non-implicit
1 parent 9127f90 commit d628734

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/AST/Module.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,6 +2461,12 @@ RestrictedImportKind SourceFile::getRestrictedImportKind(const ModuleDecl *modul
24612461
if (imports.isImportedBy(module, getParentModule()))
24622462
return RestrictedImportKind::None;
24632463

2464+
// Special case the __ObjC module. This module is implicitly imported but
2465+
// represents any clang module so we can consider it public.
2466+
if (importKind == RestrictedImportKind::Implicit &&
2467+
module->getName().str() == CLANG_HEADER_MODULE_NAME)
2468+
return RestrictedImportKind::None;
2469+
24642470
return importKind;
24652471
}
24662472

0 commit comments

Comments
 (0)