================
@@ -301,10 +301,9 @@ bool Module::directlyUses(const Module *Requested) {
if (Requested->isSubModuleOf(Use))
return true;
- // Anyone is allowed to use our builtin stdarg.h and stddef.h and their
- // accompanying modules.
- if (Requested->getTopLevelModuleName() == "_Builtin_stdarg" ||
- Requested->getTopLevelModuleName() == "_Builtin_stddef")
+ // Anyone is allowed to use our builtin stddef.h and its accompanying
modules.
+ if (Requested->fullModuleNameIs({"_Builtin_stddef", "max_align_t"}) ||
+ Requested->fullModuleNameIs({"_Builtin_stddef_wint_t"}))
----------------
ian-twilightcoder wrote:
We're taking `[no_undeclared_includes]` to imply
`-fbuiltin-headers-in-system-modules`, where `_Builtin_stdarg` is empty. The
assumption is that `[no_undeclared_includes]` is a workaround for the C++
headers not layering when the C stdlib headers are all in the same module,
which is also what `-fbuiltin-headers-in-system-modules` is for. If we don't
think that's a good assumption, then maybe we should add all of the clang C
stdlib modules here (but it's been fine so far keeping the assumption).
https://github.com/llvm/llvm-project/pull/84127
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits