================
@@ -2498,9 +2498,12 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind 
LeadingToken,
   }
 
   bool NeedsFramework = false;
-  // Don't add the top level headers to the builtin modules if the builtin 
headers
-  // belong to the system modules.
-  if (!Map.LangOpts.BuiltinHeadersInSystemModules || 
ActiveModule->isSubModule() || !isBuiltInModuleName(ActiveModule->Name))
+  // Don't add headers to the builtin modules if the builtin headers belong to
+  // the system modules, with the exception of __stddef_max_align_t.h which
+  // always had its own module.
+  if (!Map.LangOpts.BuiltinHeadersInSystemModules ||
+      !isBuiltInModuleName(ActiveModule->getTopLevelModuleName()) ||
+      ActiveModule->fullModuleNameIs({"_Builtin_stddef", "max_align_t"}))
----------------
ian-twilightcoder wrote:

I don't really know the right answer, __stddef_wint_t.h is a weird one. 
Strictly speaking it wasn't modular so anyone could import it previously. But 
then it's not really supposed to be part of stddef.h, and you have to 
specifically opt into seeing it., i.e. if you just include stddef.h you never 
got __stddef_wint_t.h. So maybe it's ok that it's unconditionally in its own 
module. Or maybe it needs to be added to `isBuiltInModuleName`.

https://github.com/llvm/llvm-project/pull/84127
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to