diff options
author | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2023-02-13 17:12:20 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2023-02-13 17:14:58 +0800 |
commit | 24ecd99842352ed1e6d7877e76e93c2f83ebf3f3 (patch) | |
tree | e047fabd245c876e1c7ea5c867c9503b5c4865e7 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 19659b5f0dd1a1dcf745cf058d042ada2d4ff061 (diff) | |
download | llvm-24ecd99842352ed1e6d7877e76e93c2f83ebf3f3.zip llvm-24ecd99842352ed1e6d7877e76e93c2f83ebf3f3.tar.gz llvm-24ecd99842352ed1e6d7877e76e93c2f83ebf3f3.tar.bz2 |
[NFC] Set C++20 Named Modules for CodeGen in ASTContext in the early place
Previously we'll set the named modules for ASTContext in ParseAST. But
this is not intuitive and we need comments to tell the intuition. This
patch moves the code the right the place, where the corrresponding
module is first created/loaded. Now it is more intuitive and we can use
the value in the earlier places.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 71ec831..71a2f61 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -509,7 +509,7 @@ static void setVisibilityFromDLLStorageClass(const clang::LangOptions &LO, } void CodeGenModule::Release() { - Module *Primary = getContext().getModuleForCodeGen(); + Module *Primary = getContext().getNamedModuleForCodeGen(); if (CXX20ModuleInits && Primary && !Primary->isHeaderLikeModule()) EmitModuleInitializers(Primary); EmitDeferred(); |