xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/cxx0x-defaulted-templates.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc template <typename T>
4f4a2713aSLionel Sambuc struct X {
5f4a2713aSLionel Sambuc   X();
6f4a2713aSLionel Sambuc };
7f4a2713aSLionel Sambuc 
8f4a2713aSLionel Sambuc // CHECK: define {{.*}} @_ZN1XIbEC2Ev
9*0a6a1f1dSLionel Sambuc // CHECK: define {{.*}} @_ZN1XIbEC1Ev
10f4a2713aSLionel Sambuc template <> X<bool>::X() = default;
11f4a2713aSLionel Sambuc 
12f4a2713aSLionel Sambuc // CHECK: define weak_odr {{.*}} @_ZN1XIiEC2Ev
13*0a6a1f1dSLionel Sambuc // CHECK: define weak_odr {{.*}} @_ZN1XIiEC1Ev
14f4a2713aSLionel Sambuc template <typename T> X<T>::X() = default;
15f4a2713aSLionel Sambuc template X<int>::X();
16f4a2713aSLionel Sambuc 
17f4a2713aSLionel Sambuc // CHECK: define linkonce_odr {{.*}} @_ZN1XIcEC1Ev
18f4a2713aSLionel Sambuc // CHECK: define linkonce_odr {{.*}} @_ZN1XIcEC2Ev
19f4a2713aSLionel Sambuc X<char> x;
20