diff options
author | Ian Anderson <iana@apple.com> | 2024-04-12 22:36:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 22:36:43 -0700 |
commit | 4138367444a2e3431cdfc7ab6e16c9cab5c76ad8 (patch) | |
tree | e83bb41466ed1c48d2b5c56de00750fc4666d986 /clang/lib/Basic/Module.cpp | |
parent | ed128c7df9b4e60bfd814dc9fd22de1dde4a2c1c (diff) | |
download | llvm-4138367444a2e3431cdfc7ab6e16c9cab5c76ad8.zip llvm-4138367444a2e3431cdfc7ab6e16c9cab5c76ad8.tar.gz llvm-4138367444a2e3431cdfc7ab6e16c9cab5c76ad8.tar.bz2 |
[modules] allow use of ptrauth module from no_undeclared_includes system modules (#88432)
Co-authored-by: Alex Lorenz <arphaman@gmail.com>
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r-- | clang/lib/Basic/Module.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index 256365d..bb212cd 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/lib/Basic/Module.cpp @@ -305,6 +305,10 @@ bool Module::directlyUses(const Module *Requested) { if (Requested->fullModuleNameIs({"_Builtin_stddef", "max_align_t"}) || Requested->fullModuleNameIs({"_Builtin_stddef_wint_t"})) return true; + // Darwin is allowed is to use our builtin 'ptrauth.h' and its accompanying + // module. + if (!Requested->Parent && Requested->Name == "ptrauth") + return true; if (NoUndeclaredIncludes) UndeclaredUses.insert(Requested); |