Move "clang/Basic/TokenKinds.h" into a separate top-level module.

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

Differential Revision: https://reviews.llvm.org/D130377
This commit is contained in:
Volodymyr Sapsai 2022-07-22 11:43:07 -07:00
parent c105d9b3d6
commit 1e4478bbea
1 changed files with 8 additions and 1 deletions

View File

@ -71,10 +71,17 @@ module Clang_Basic {
textual header "Basic/RISCVVTypes.def" textual header "Basic/RISCVVTypes.def"
textual header "Basic/Sanitizers.def" textual header "Basic/Sanitizers.def"
textual header "Basic/TargetCXXABI.def" textual header "Basic/TargetCXXABI.def"
textual header "Basic/TokenKinds.def"
module * { export * } 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_CodeGen { requires cplusplus umbrella "CodeGen" module * { export * } }
module Clang_Config { requires cplusplus umbrella "Config" module * { export * } } module Clang_Config { requires cplusplus umbrella "Config" module * { export * } }