diff options
author | Ian Anderson <iana@apple.com> | 2023-10-04 15:43:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 15:43:17 -0700 |
commit | 4ee8c676ee370f5cd53cb6ac3a9c27c7088f2eae (patch) | |
tree | 4f5c557d01d0bcad006ce535b44e735ac482e02f /clang/lib/Basic/Module.cpp | |
parent | 1879b2570adc7e9f0c02be8d234960b1f68e2f32 (diff) | |
download | llvm-4ee8c676ee370f5cd53cb6ac3a9c27c7088f2eae.zip llvm-4ee8c676ee370f5cd53cb6ac3a9c27c7088f2eae.tar.gz llvm-4ee8c676ee370f5cd53cb6ac3a9c27c7088f2eae.tar.bz2 |
[Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (#68241)
All of the _Builtin_stdarg and _Builtin_stddef submodules need to be
allowed from [no_undeclared_includes] modules. Split the builtin headers
tests out from the compiler_builtins test so that the testing modules
can be modified without affecting the other many tests that use
Inputs/System/usr/include.
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r-- | clang/lib/Basic/Module.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index 0fd9c1d..7879a11 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/lib/Basic/Module.cpp @@ -301,7 +301,8 @@ bool Module::directlyUses(const Module *Requested) { // Anyone is allowed to use our builtin stdarg.h and stddef.h and their // accompanying modules. - if (!Requested->Parent && (Requested->Name == "_Builtin_stdarg" || Requested->Name == "_Builtin_stddef")) + if (Requested->getTopLevelModuleName() == "_Builtin_stdarg" || + Requested->getTopLevelModuleName() == "_Builtin_stddef") return true; if (NoUndeclaredIncludes) |