[PATCH] D130871: [C++20] [Modules] Handle initializer for Header Units
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 1 00:22:13 PDT 2022
ChuanqiXu added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2524-2525
for (Decl *D : getContext().getModuleInitializers(GMF)) {
- assert(D->getKind() == Decl::Var && "GMF initializer decl is not a var?");
+ if (isa<ImportDecl>(D))
+ continue;
+ assert(isa<VarDecl>(D) && "GMF initializer decl is not a var?");
----------------
See the example about `M.cppm`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130871/new/
https://reviews.llvm.org/D130871
More information about the cfe-commits
mailing list