Debian Codegraph @

clang/test/Modules/vtable-in-explicit-instantiation.cppm

raw
1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: split-file %s %t
4
5 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-module-interface -o %t/a.pcm
6 // 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
7 //
8 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -triple %itanium_abi_triple -emit-reduced-module-interface -o %t/a.pcm
9 // 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
10
11 //--- a.cppm
12 export module a;
13 class base {
14 public:
15 ~base() = default;
16 virtual void foo();
17 };
18
19 template <class T>
20 class a : public base {
21 public:
22 virtual void foo() override;
23 };
24
25 extern template class a<int>;
26
27 //--- a.cc
28 module a;
29
30 template <class T>
31 void a<T>::foo() {}
32
33 template class a<int>;
34 // CHECK: _ZTVW1a1aIiE