summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/windows-itanium-dllexport.cpp
blob: 92cca24442874717a27675ce1d2c64c5db943c62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// RUN: %clang_cc1 -emit-llvm -triple i686-windows-itanium -fdeclspec %s -o - | FileCheck %s

struct __declspec(dllexport) s {
  void f() {}
};

// CHECK: define {{.*}} dllexport {{.*}} @_ZN1saSERKS_
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1s1fEv

template <class T>
class c {
  void f() {}
};

template class __declspec(dllexport) c<int>;

// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIiEaSERKS0_
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIiE1fEv

extern template class c<char>;
template class __declspec(dllexport) c<char>;

// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIcEaSERKS0_
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIcE1fEv

c<double> g;
template class __declspec(dllexport) c<double>;

// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIdEaSERKS0_
// CHECK: define {{.*}} dllexport {{.*}} @_ZN1cIdE1fEv
OpenPOWER on IntegriCloud