blob: f4d5ccc0e3319bf1b4de6cb67475427763262eac [file] [log] [blame]
Richard Smith9ca5c422011-10-13 22:29:44 +00001// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
Alexis Hunt6a31f2c2011-05-23 23:56:01 +00002
3template <typename T>
4struct X {
5 X();
6};
7
Eli Friedmana526f272011-06-13 22:51:21 +00008// CHECK: define {{.*}} @_ZN1XIbEC1Ev
9// CHECK: define {{.*}} @_ZN1XIbEC2Ev
Alexis Hunt6a31f2c2011-05-23 23:56:01 +000010template <> X<bool>::X() = default;
11
Eli Friedmana526f272011-06-13 22:51:21 +000012// CHECK: define weak_odr {{.*}} @_ZN1XIiEC1Ev
13// CHECK: define weak_odr {{.*}} @_ZN1XIiEC2Ev
Alexis Hunt6a31f2c2011-05-23 23:56:01 +000014template <typename T> X<T>::X() = default;
15template X<int>::X();
16
Eli Friedmana526f272011-06-13 22:51:21 +000017// CHECK: define linkonce_odr {{.*}} @_ZN1XIcEC1Ev
18// CHECK: define linkonce_odr {{.*}} @_ZN1XIcEC2Ev
Alexis Hunt6a31f2c2011-05-23 23:56:01 +000019X<char> x;