[PATCH] D132421: [HLSL] Support PCH for cc1 mode
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 31 13:50:37 PDT 2022
python3kgae marked an inline comment as done.
python3kgae added inline comments.
================
Comment at: clang/include/clang/Sema/HLSLExternalSemaSource.h:58
+/// them before we initialize the ExternalSemaSource base class.
+struct ChainedHLSLExternalSemaSourceMembers {
+ ChainedHLSLExternalSemaSourceMembers(ExternalSemaSource *ExtSema)
----------------
beanz wrote:
> IIUC, this code just exists to make sure that the `ASTReader` deserializes before the external sema source starts adding things. Is that correct?
>
> If so, you don't need to do this, instead you can just add this code to `InitializeSema()` to force the `ASTReader` to de-serialize the decls:
>
> ```
> // If the translation unit has external storage force external decls to load.
> if (AST.getTranslationUnitDecl()->hasExternalLexicalStorage())
> (void)AST.getTranslationUnitDecl()->decls_begin();
> ```
Still need this to make sure HLSLSema and ExternalSema are initialized before MultiplexExternalSemaSource.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132421/new/
https://reviews.llvm.org/D132421
More information about the cfe-commits
mailing list