// RUN: %clang_cc1 -O1 -fno-experimental-new-pass-manager -triple %itanium_abi_triple -emit-llvm -o - -fvisibility hidden %s | FileCheck %s template struct X { void f(); void g() { } }; template void X::f() { } extern template struct X; template struct X; extern template struct X; // void test_X(X xi, X xc) { // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1fEv xi.f(); // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1gEv xi.g(); // CHECK: declare {{.*}}void @_ZN1XIcE1fEv xc.f(); // CHECK-LABEL: define available_externally {{.*}}void @_ZN1XIcE1gEv xc.g(); }