[RISCV] Add shrinkwrap test cases showing gaps in current impl
[llvm-project.git] / clang / test / CodeGenCXX / visibility-hidden-extern-templates.cpp
blob3a90159b469be9d66f3a996b985d99bfecf85eb3
1 // RUN: %clang_cc1 -O1 -disable-llvm-passes -triple %itanium_abi_triple -emit-llvm -o - -fvisibility=hidden %s | FileCheck %s
3 template<typename T>
4 struct X {
5 void f();
6 void g() { }
7 };
9 template<typename T> void X<T>::f() { }
11 extern template struct X<int>;
12 template struct X<int>;
13 extern template struct X<char>;
15 void test_X(X<int> xi, X<char> xc) {
16 // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1fEv
17 xi.f();
18 // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1gEv
19 xi.g();
20 // CHECK: declare {{.*}}void @_ZN1XIcE1fEv
21 xc.f();
22 // CHECK-LABEL: define available_externally {{.*}}void @_ZN1XIcE1gEv
23 xc.g();