Skip to content

Commit 5262691

Browse files
[Modules] Allow any client to use the upcoming new clang modules
In order to ease adoption of the new clang modules, allow them before they're actually introduced. rdar://105819340
1 parent 572a5a4 commit 5262691

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

clang/lib/Basic/Module.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,11 @@ bool Module::directlyUses(const Module *Requested) {
305305
if (Requested->isSubModuleOf(Use))
306306
return true;
307307

308-
// Anyone is allowed to use our builtin stddef.h and its accompanying module.
309-
if (!Requested->Parent && Requested->Name == "_Builtin_stddef_max_align_t")
308+
// Anyone is allowed to use our builtin stdarg.h and stddef.h and their
309+
// accompanying modules.
310+
if (Requested->getTopLevelModuleName() == "_Builtin_stdarg" ||
311+
Requested->getTopLevelModuleName() == "_Builtin_stddef" ||
312+
(!Requested->Parent && Requested->Name == "_Builtin_stddef_max_align_t"))
310313
return true;
311314

312315
if (NoUndeclaredIncludes)

0 commit comments

Comments
 (0)