[PATCH] D159483: [Modules] Add a flag to control builtin headers being in system modules

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 7 13:03:08 PDT 2023


benlangmuir added a comment.

> but need to be repeatedly included when they're used in system modules

How does this work today? Wouldn't the include guard prevent this?



================
Comment at: clang/include/clang/Basic/Features.def:233
 FEATURE(modules, LangOpts.Modules)
+FEATURE(builtin_headers_in_system_modules, LangOpts.BuiltinHeadersInSystemModules)
 FEATURE(safe_stack, LangOpts.Sanitize.has(SanitizerKind::SafeStack))
----------------
This appears to be in a list of `// C++ TSes`.  Near the bottom there is 'Miscellaneous language extensions' which might be a better fit.


================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2851
+  if (!SDKInfo)
+    return false;
+  
----------------
I would have expected the default to be true; do old SDKs not have SDKInfo or something?


================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:2856
+  case Darwin::MacOS:
+    return SDKVersion >= VersionTuple(100U);
+  case Darwin::IPhoneOS:
----------------
Are these really supposed to be 100 or is this a placeholder?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159483/new/

https://reviews.llvm.org/D159483



More information about the cfe-commits mailing list