Issue |
123719
|
Summary |
[C++20] [Modules] Missing vtable for explicit template instantiation in other units
|
Labels |
clang:modules
|
Assignees |
|
Reporter |
ChuanqiXu9
|
Reproducer:
```
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: split-file %s %t
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-module-interface -o %t/a.pcm
// RUN: %clang_cc1 -std=c++20 %t/a.cc -triple %itanium_abi_triple -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/a.cc
//
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-reduced-module-interface -o %t/a.pcm
// RUN: %clang_cc1 -std=c++20 %t/a.cc -triple %itanium_abi_triple -fmodule-file=a=%t/a.pcm -emit-llvm -o - | FileCheck %t/a.cc
//--- a.cppm
export module a;
class base {
public:
~base() = default;
virtual void foo();
};
template <class T>
class a : public base {
public:
virtual void foo() override;
};
extern template class a<int>;
//--- a.cc
module a:impl;
import a;
template <class T>
void a<T>::foo() {}
template class a<int>;
// CHECK: _ZTVW1a1aIiE
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs