From 7f37066915ab330f153ede708ddc610cf2cb7bdf Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 16 May 2023 10:36:08 +0800 Subject: Revert "[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU into" This reverts commit f109b1016801e2b0dbee278f3c517057c0b1d441 as required in https://github.com/llvm/llvm-project/commit/f109b1016801e2b0dbee278f3c517057c0b1d441#commitcomment-113477829. --- 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 d3cde11a7e96..7534304b1878 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().getCurrentNamedModule(); + Module *Primary = getContext().getNamedModuleForCodeGen(); if (CXX20ModuleInits && Primary && !Primary->isHeaderLikeModule()) EmitModuleInitializers(Primary); EmitDeferred(); -- cgit v1.2.3