[PATCH] D130377: Move "clang/Basic/TokenKinds.h" into a separate top-level module.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 22 12:04:38 PDT 2022


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

Fixes modular build for clangPseudoGrammar from clang-tools-extra.

Starting from https://reviews.llvm.org/D126731 clangPseudoGrammar
doesn't depend on generated .inc headers but still depends on
"Basic/TokenKinds.h". It means clangPseudoGrammar depends on module
'Clang_Basic' which does depend on generated .inc headers. To avoid
these coarse dependencies and extra build steps, extract
"clang/Basic/TokenKinds.h" into a top-level module 'Clang_Basic_TokenKinds'.

rdar://97387951


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130377

Files:
  clang/include/clang/module.modulemap


Index: clang/include/clang/module.modulemap
===================================================================
--- clang/include/clang/module.modulemap
+++ clang/include/clang/module.modulemap
@@ -71,10 +71,17 @@
   textual header "Basic/RISCVVTypes.def"
   textual header "Basic/Sanitizers.def"
   textual header "Basic/TargetCXXABI.def"
-  textual header "Basic/TokenKinds.def"
 
   module * { export * }
 }
+module Clang_Basic_TokenKinds {
+  requires cplusplus
+
+  header "Basic/TokenKinds.h"
+  textual header "Basic/TokenKinds.def"
+
+  export *
+}
 
 module Clang_CodeGen { requires cplusplus umbrella "CodeGen" module * { export * } }
 module Clang_Config { requires cplusplus umbrella "Config" module * { export * } }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130377.446925.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220722/ad2972e6/attachment.bin>


More information about the cfe-commits mailing list