Similar to r284288, make the Itanium ABI follow MS ABI dllexport semantics in the case of an explicit instantiation declaration followed by a dllexport explicit instantiation definition. Differential Revision: https://reviews.llvm.org/D26471 llvm-svn: 286419
26 lines
654 B
C++
26 lines
654 B
C++
// 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
|
|
|