This revision was automatically updated to reflect the committed changes.
Closed by commit rGdb6152ad66d7: [C++20] [Modules] Handle initializer for
Header Units (authored by ChuanqiXu).
Changed prior to commit:
https://reviews.llvm.org/D130871?vs=448931&id=449172#toc
Repository:
rG LLVM Gith
iains accepted this revision.
iains added a comment.
This revision is now accepted and ready to land.
LGTM, one small point about the test,
Comment at: clang/test/CodeGenCXX/module-initializer-header.cppm:5-7
+// RUN: %clang_cc1 -std=c++20 -triple=x86_64-unknown-linux-gnu
-xc+
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(D))
+continue;
+
ChuanqiXu created this revision.
ChuanqiXu added a reviewer: iains.
ChuanqiXu added a project: clang-modules.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Previously when we add module initializer,