summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2023-05-10 11:54:04 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2023-05-10 16:01:27 +0800
commitf109b1016801e2b0dbee278f3c517057c0b1d441 (patch)
tree4be22434048fec4aceb6983b19f99cd4d2667f34 /clang/lib/CodeGen/CodeGenModule.cpp
parentfa1f88cdeca245497843c507167b84f5522e88cc (diff)
[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into
Decl::isInCurrentModuleUnit Refactor `Sema::isModuleUnitOfCurrentTU` to `Decl::isInCurrentModuleUnit` to make code simpler a little bit. Note that although this patch introduces a FIXME, this is an existing issue and this patch just tries to describe it explicitly.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 7534304b1878..d3cde11a7e96 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -529,7 +529,7 @@ static void setVisibilityFromDLLStorageClass(const clang::LangOptions &LO,
}
void CodeGenModule::Release() {
- Module *Primary = getContext().getNamedModuleForCodeGen();
+ Module *Primary = getContext().getCurrentNamedModule();
if (CXX20ModuleInits && Primary && !Primary->isHeaderLikeModule())
EmitModuleInitializers(Primary);
EmitDeferred();