[C++20] [Modules] [ABI] The linkage of implicit special methods
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Similar to https://github.com/llvm/llvm-project/issues/145676
But the issue is for implicit special methods. e.g.,
```C++
export module M;
class V {
public:
V() { ... }
~V() { ... }
};
class S {
V v;
public:
};
```
In the module unit, we should generate `S::S()` and `S::~()` as a strong symbol. This is useful for faster compilation.
The difference between https://github.com/llvm/llvm-project/issues/145676 is, there are cases we can't generate these special methods:
```C++
export module M;
class V {
public:
V() = delete;
V(int);
~V() { ... }
};
class S {
V v;
public:
S(int);
};
```
Contributor guide
Research direction
Start by comparing this request with LLVM issue 145676 and tracing how C++20 module units handle implicit special methods and ABI symbol linkage. Determine the cases where constructors or destructors can be emitted as strong symbols, including deleted or unavailable special methods. Done means the intended linkage behavior is specified and covered by relevant compiler tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100