[all-commits] [llvm/llvm-project] 989173: [C++20] [Modules] Don't generate call to an import...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Thu Sep 28 08:29:38 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 989173c09c2930a9f523ccb455111ef446e9f96d
https://github.com/llvm/llvm-project/commit/989173c09c2930a9f523ccb455111ef446e9f96d
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-09-28 (Thu, 28 Sep 2023)
Changed paths:
M clang/include/clang/Basic/Module.h
M clang/lib/Basic/Module.cpp
M clang/lib/CodeGen/CGDeclCXX.cpp
M clang/lib/Sema/Sema.cpp
M clang/lib/Serialization/ASTReader.cpp
M clang/lib/Serialization/ASTWriter.cpp
M clang/test/CodeGenCXX/module-initializer-guard-elision.cpp
Log Message:
-----------
[C++20] [Modules] Don't generate call to an imported module that dont init anything (#67638)
Close https://github.com/llvm/llvm-project/issues/56794
And see https://github.com/llvm/llvm-project/issues/67582 for a detailed
backgrond for the issue.
As required by the Itanium ABI, the module units have to generate the
initialization function. However, the importers are allowed to elide the
call to the initialization function if they are sure the initialization
function doesn't do anything.
This patch implemented this semantics.
More information about the All-commits
mailing list