Skip to content
Commit 08f95780 authored by Chuanqi Xu's avatar Chuanqi Xu
Browse files

[C++20] [Modules] Don't generate global ctors/dtors for variables which are available externally

Closes https://github.com/llvm/llvm-project/issues/59765.

Currently we will generate the global ctor/dtor for variables in
importing modules. It will cause multiple initialization/destructions.
It makes no sense. This patch tries to not generate global ctor/dtor for
variables which are available externally. Note that the variables in
header units and clang modules won't be available externally by default.

Reviewed By: iains

Differential Revision: https://reviews.llvm.org/D140867
parent ee1be282
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment