[clang] 260fb2b - [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

Ian Anderson via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 14:57:24 PDT 2022


Author: Ian Anderson
Date: 2022-08-30T14:57:15-07:00
New Revision: 260fb2bc3f79019cae4e182a64c8752d3d25049e

URL: https://github.com/llvm/llvm-project/commit/260fb2bc3f79019cae4e182a64c8752d3d25049e
DIFF: https://github.com/llvm/llvm-project/commit/260fb2bc3f79019cae4e182a64c8752d3d25049e.diff

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

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.

Reviewed By: ributzka, Bigcheese

Differential Revision: https://reviews.llvm.org/D132971

Added: 
    

Modified: 
    clang/lib/Lex/ModuleMap.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp
index 3698a8c932d72..87a90bc3e704f 100644
--- a/clang/lib/Lex/ModuleMap.cpp
+++ b/clang/lib/Lex/ModuleMap.cpp
@@ -2026,8 +2026,7 @@ void ModuleMapParser::parseModuleDecl() {
     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;
 


        


More information about the cfe-commits mailing list