From f109b1016801e2b0dbee278f3c517057c0b1d441 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 10 May 2023 11:54:04 +0800 Subject: [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. --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') 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(); -- cgit v1.2.3