[PATCH] D132971: [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

Ian Anderson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 13:11:20 PDT 2022


iana created this revision.
iana added reviewers: bruno, ributzka, vsapsai, Bigcheese.
Herald added a project: All.
iana requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The Darwin module has specified [no_undeclared_includes] for at least five years now, there's no need to hard code it in the compiler.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132971

Files:
  clang/lib/Lex/ModuleMap.cpp


Index: clang/lib/Lex/ModuleMap.cpp
===================================================================
--- clang/lib/Lex/ModuleMap.cpp
+++ clang/lib/Lex/ModuleMap.cpp
@@ -2026,8 +2026,7 @@
     ActiveModule->IsSystem = true;
   if (Attrs.IsExternC)
     ActiveModule->IsExternC = true;
-  if (Attrs.NoUndeclaredIncludes ||
-      (!ActiveModule->Parent && ModuleName == "Darwin"))
+  if (Attrs.NoUndeclaredIncludes)
     ActiveModule->NoUndeclaredIncludes = true;
   ActiveModule->Directory = Directory;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132971.456769.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220830/cd188553/attachment.bin>


More information about the cfe-commits mailing list