xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/dllexport-members.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M32 %s
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M64 %s
3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
4*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-windows-gnu                     -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc // Helper structs to make templates more expressive.
7*0a6a1f1dSLionel Sambuc struct ImplicitInst_Exported {};
8*0a6a1f1dSLionel Sambuc struct ExplicitDecl_Exported {};
9*0a6a1f1dSLionel Sambuc struct ExplicitInst_Exported {};
10*0a6a1f1dSLionel Sambuc struct ExplicitSpec_Exported {};
11*0a6a1f1dSLionel Sambuc struct ExplicitSpec_Def_Exported {};
12*0a6a1f1dSLionel Sambuc struct ExplicitSpec_InlineDef_Exported {};
13*0a6a1f1dSLionel Sambuc struct ExplicitSpec_NotExported {};
14*0a6a1f1dSLionel Sambuc 
15*0a6a1f1dSLionel Sambuc extern "C" void* malloc(__SIZE_TYPE__ size);
16*0a6a1f1dSLionel Sambuc extern "C" void free(void* p);
17*0a6a1f1dSLionel Sambuc 
18*0a6a1f1dSLionel Sambuc 
19*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
20*0a6a1f1dSLionel Sambuc // Class members
21*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
22*0a6a1f1dSLionel Sambuc 
23*0a6a1f1dSLionel Sambuc // Export individual members of a class.
24*0a6a1f1dSLionel Sambuc struct ExportMembers {
25*0a6a1f1dSLionel Sambuc   struct Nested;
26*0a6a1f1dSLionel Sambuc 
27*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?normalDef@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
28*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?normalDef@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
29*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInclass@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
30*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?normalInclass@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
31*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDef@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
32*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?normalInlineDef@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
33*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDecl@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
34*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?normalInlineDecl@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
35*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers9normalDefEv(%struct.ExportMembers* %this)
36*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers9normalDefEv(%struct.ExportMembers* %this)
37*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers13normalInclassEv(%struct.ExportMembers* %this)
38*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers13normalInclassEv(%struct.ExportMembers* %this)
39*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers15normalInlineDefEv(%struct.ExportMembers* %this)
40*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers15normalInlineDefEv(%struct.ExportMembers* %this)
41*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers16normalInlineDeclEv(%struct.ExportMembers* %this)
42*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers16normalInlineDeclEv(%struct.ExportMembers* %this)
43*0a6a1f1dSLionel Sambuc   // M32-DAG: define linkonce_odr       x86_thiscallcc void @"\01?referencedNonExportedInClass@ExportMembers@@QAEXXZ"
44*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void normalDef();
normalInclassExportMembers45*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void normalInclass() { referencedNonExportedInClass(); }
46*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void normalInlineDef();
47*0a6a1f1dSLionel Sambuc   __declspec(dllexport)         inline void normalInlineDecl();
referencedNonExportedInClassExportMembers48*0a6a1f1dSLionel Sambuc                                        void referencedNonExportedInClass() {}
49*0a6a1f1dSLionel Sambuc 
50*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?virtualDef@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
51*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?virtualDef@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
52*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInclass@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
53*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?virtualInclass@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
54*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDef@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
55*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?virtualInlineDef@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
56*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDecl@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
57*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?virtualInlineDecl@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
58*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers10virtualDefEv(%struct.ExportMembers* %this)
59*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers10virtualDefEv(%struct.ExportMembers* %this)
60*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers14virtualInclassEv(%struct.ExportMembers* %this)
61*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers14virtualInclassEv(%struct.ExportMembers* %this)
62*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers16virtualInlineDefEv(%struct.ExportMembers* %this)
63*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers16virtualInlineDefEv(%struct.ExportMembers* %this)
64*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers17virtualInlineDeclEv(%struct.ExportMembers* %this)
65*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers17virtualInlineDeclEv(%struct.ExportMembers* %this)
66*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual        void virtualDef();
virtualInclassExportMembers67*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual        void virtualInclass() {}
68*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual        void virtualInlineDef();
69*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual inline void virtualInlineDecl();
70*0a6a1f1dSLionel Sambuc 
71*0a6a1f1dSLionel Sambuc   // MSC-DAG: define          dllexport                void @"\01?staticDef@ExportMembers@@SAXXZ"()
72*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01?staticInclass@ExportMembers@@SAXXZ"()
73*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01?staticInlineDef@ExportMembers@@SAXXZ"()
74*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01?staticInlineDecl@ExportMembers@@SAXXZ"()
75*0a6a1f1dSLionel Sambuc   // GNU-DAG: define          dllexport                void @_ZN13ExportMembers9staticDefEv()
76*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN13ExportMembers13staticInclassEv()
77*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN13ExportMembers15staticInlineDefEv()
78*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN13ExportMembers16staticInlineDeclEv()
79*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void staticDef();
staticInclassExportMembers80*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void staticInclass() {}
81*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void staticInlineDef();
82*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  inline void staticInlineDecl();
83*0a6a1f1dSLionel Sambuc 
84*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?protectedDef@ExportMembers@@IAEXXZ"(%struct.ExportMembers* %this)
85*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?protectedDef@ExportMembers@@IEAAXXZ"(%struct.ExportMembers* %this)
86*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers12protectedDefEv(%struct.ExportMembers* %this)
87*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers12protectedDefEv(%struct.ExportMembers* %this)
88*0a6a1f1dSLionel Sambuc   // MSC-DAG: define          dllexport                void @"\01?protectedStaticDef@ExportMembers@@KAXXZ"()
89*0a6a1f1dSLionel Sambuc   // GNU-DAG: define          dllexport                void @_ZN13ExportMembers18protectedStaticDefEv()
90*0a6a1f1dSLionel Sambuc protected:
91*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void protectedDef();
92*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void protectedStaticDef();
93*0a6a1f1dSLionel Sambuc 
94*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?privateDef@ExportMembers@@AAEXXZ"(%struct.ExportMembers* %this)
95*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?privateDef@ExportMembers@@AEAAXXZ"(%struct.ExportMembers* %this)
96*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers10privateDefEv(%struct.ExportMembers* %this)
97*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers10privateDefEv(%struct.ExportMembers* %this)
98*0a6a1f1dSLionel Sambuc   // MSC-DAG: define          dllexport                void @"\01?privateStaticDef@ExportMembers@@CAXXZ"()
99*0a6a1f1dSLionel Sambuc   // GNU-DAG: define          dllexport                void @_ZN13ExportMembers16privateStaticDefEv()
100*0a6a1f1dSLionel Sambuc private:
101*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void privateDef();
102*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void privateStaticDef();
103*0a6a1f1dSLionel Sambuc 
104*0a6a1f1dSLionel Sambuc   // M32-DAG: define                    x86_thiscallcc void @"\01?ignored@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
105*0a6a1f1dSLionel Sambuc   // M64-DAG: define                                   void @"\01?ignored@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
106*0a6a1f1dSLionel Sambuc   // G32-DAG: define                    x86_thiscallcc void @_ZN13ExportMembers7ignoredEv(%struct.ExportMembers* %this)
107*0a6a1f1dSLionel Sambuc   // G64-DAG: define                                   void @_ZN13ExportMembers7ignoredEv(%struct.ExportMembers* %this)
108*0a6a1f1dSLionel Sambuc public:
109*0a6a1f1dSLionel Sambuc   void ignored();
110*0a6a1f1dSLionel Sambuc 
111*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticField@ExportMembers@@2HA"               = dllexport global i32 1, align 4
112*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstField@ExportMembers@@2HB"          = dllexport constant i32 1, align 4
113*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldEqualInit@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
114*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldBraceInit@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
115*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?ConstexprField@ExportMembers@@2HB"            = weak_odr dllexport constant i32 1, align 4
116*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers11StaticFieldE                   = dllexport global i32 1, align 4
117*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers16StaticConstFieldE              = dllexport constant i32 1, align 4
118*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers25StaticConstFieldEqualInitE     = dllexport constant i32 1, align 4
119*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers25StaticConstFieldBraceInitE     = dllexport constant i32 1, align 4
120*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers14ConstexprFieldE                = dllexport constant i32 1, align 4
121*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         int  StaticField;
122*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  const  int  StaticConstField;
123*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  const  int  StaticConstFieldEqualInit = 1;
124*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  const  int  StaticConstFieldBraceInit{1};
125*0a6a1f1dSLionel Sambuc   __declspec(dllexport) constexpr static int ConstexprField = 1;
126*0a6a1f1dSLionel Sambuc };
127*0a6a1f1dSLionel Sambuc 
normalDef()128*0a6a1f1dSLionel Sambuc        void ExportMembers::normalDef() {}
normalInlineDef()129*0a6a1f1dSLionel Sambuc inline void ExportMembers::normalInlineDef() {}
normalInlineDecl()130*0a6a1f1dSLionel Sambuc        void ExportMembers::normalInlineDecl() {}
virtualDef()131*0a6a1f1dSLionel Sambuc        void ExportMembers::virtualDef() {}
virtualInlineDef()132*0a6a1f1dSLionel Sambuc inline void ExportMembers::virtualInlineDef() {}
virtualInlineDecl()133*0a6a1f1dSLionel Sambuc        void ExportMembers::virtualInlineDecl() {}
staticDef()134*0a6a1f1dSLionel Sambuc        void ExportMembers::staticDef() {}
staticInlineDef()135*0a6a1f1dSLionel Sambuc inline void ExportMembers::staticInlineDef() {}
staticInlineDecl()136*0a6a1f1dSLionel Sambuc        void ExportMembers::staticInlineDecl() {}
ignored()137*0a6a1f1dSLionel Sambuc        void ExportMembers::ignored() {}
protectedDef()138*0a6a1f1dSLionel Sambuc        void ExportMembers::protectedDef() {}
protectedStaticDef()139*0a6a1f1dSLionel Sambuc        void ExportMembers::protectedStaticDef() {}
privateDef()140*0a6a1f1dSLionel Sambuc        void ExportMembers::privateDef() {}
privateStaticDef()141*0a6a1f1dSLionel Sambuc        void ExportMembers::privateStaticDef() {}
142*0a6a1f1dSLionel Sambuc 
143*0a6a1f1dSLionel Sambuc        int  ExportMembers::StaticField = 1;
144*0a6a1f1dSLionel Sambuc const  int  ExportMembers::StaticConstField = 1;
145*0a6a1f1dSLionel Sambuc const  int  ExportMembers::StaticConstFieldEqualInit;
146*0a6a1f1dSLionel Sambuc const  int  ExportMembers::StaticConstFieldBraceInit;
147*0a6a1f1dSLionel Sambuc constexpr int ExportMembers::ConstexprField;
148*0a6a1f1dSLionel Sambuc 
149*0a6a1f1dSLionel Sambuc 
150*0a6a1f1dSLionel Sambuc // Export individual members of a nested class.
151*0a6a1f1dSLionel Sambuc struct ExportMembers::Nested {
152*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?normalDef@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
153*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?normalDef@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
154*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInclass@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
155*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?normalInclass@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
156*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDef@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
157*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?normalInlineDef@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
158*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDecl@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
159*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?normalInlineDecl@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
160*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested9normalDefEv(%"struct.ExportMembers::Nested"* %this)
161*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers6Nested9normalDefEv(%"struct.ExportMembers::Nested"* %this)
162*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested13normalInclassEv(%"struct.ExportMembers::Nested"* %this)
163*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested13normalInclassEv(%"struct.ExportMembers::Nested"* %this)
164*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested15normalInlineDefEv(%"struct.ExportMembers::Nested"* %this)
165*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested15normalInlineDefEv(%"struct.ExportMembers::Nested"* %this)
166*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16normalInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
167*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested16normalInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
168*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void normalDef();
normalInclassExportMembers::Nested169*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void normalInclass() {}
170*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void normalInlineDef();
171*0a6a1f1dSLionel Sambuc   __declspec(dllexport)         inline void normalInlineDecl();
172*0a6a1f1dSLionel Sambuc 
173*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?virtualDef@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
174*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?virtualDef@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
175*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInclass@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
176*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?virtualInclass@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
177*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDef@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
178*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?virtualInlineDef@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
179*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDecl@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
180*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01?virtualInlineDecl@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
181*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10virtualDefEv(%"struct.ExportMembers::Nested"* %this)
182*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers6Nested10virtualDefEv(%"struct.ExportMembers::Nested"* %this)
183*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested14virtualInclassEv(%"struct.ExportMembers::Nested"* %this)
184*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested14virtualInclassEv(%"struct.ExportMembers::Nested"* %this)
185*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16virtualInlineDefEv(%"struct.ExportMembers::Nested"* %this)
186*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested16virtualInlineDefEv(%"struct.ExportMembers::Nested"* %this)
187*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
188*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
189*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual        void virtualDef();
virtualInclassExportMembers::Nested190*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual        void virtualInclass() {}
191*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual        void virtualInlineDef();
192*0a6a1f1dSLionel Sambuc   __declspec(dllexport) virtual inline void virtualInlineDecl();
193*0a6a1f1dSLionel Sambuc 
194*0a6a1f1dSLionel Sambuc   // MSC-DAG: define          dllexport                void @"\01?staticDef@Nested@ExportMembers@@SAXXZ"()
195*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01?staticInclass@Nested@ExportMembers@@SAXXZ"()
196*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01?staticInlineDef@Nested@ExportMembers@@SAXXZ"()
197*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01?staticInlineDecl@Nested@ExportMembers@@SAXXZ"()
198*0a6a1f1dSLionel Sambuc   // GNU-DAG: define          dllexport                void @_ZN13ExportMembers6Nested9staticDefEv()
199*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested13staticInclassEv()
200*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested15staticInlineDefEv()
201*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN13ExportMembers6Nested16staticInlineDeclEv()
202*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void staticDef();
staticInclassExportMembers::Nested203*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void staticInclass() {}
204*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void staticInlineDef();
205*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  inline void staticInlineDecl();
206*0a6a1f1dSLionel Sambuc 
207*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?protectedDef@Nested@ExportMembers@@IAEXXZ"(%"struct.ExportMembers::Nested"* %this)
208*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?protectedDef@Nested@ExportMembers@@IEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
209*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested12protectedDefEv(%"struct.ExportMembers::Nested"* %this)
210*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers6Nested12protectedDefEv(%"struct.ExportMembers::Nested"* %this)
211*0a6a1f1dSLionel Sambuc   // MSC-DAG: define          dllexport                void @"\01?protectedStaticDef@Nested@ExportMembers@@KAXXZ"()
212*0a6a1f1dSLionel Sambuc   // GNU-DAG: define          dllexport                void @_ZN13ExportMembers6Nested18protectedStaticDefEv()
213*0a6a1f1dSLionel Sambuc protected:
214*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void protectedDef();
215*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void protectedStaticDef();
216*0a6a1f1dSLionel Sambuc 
217*0a6a1f1dSLionel Sambuc   // M32-DAG: define          dllexport x86_thiscallcc void @"\01?privateDef@Nested@ExportMembers@@AAEXXZ"(%"struct.ExportMembers::Nested"* %this)
218*0a6a1f1dSLionel Sambuc   // M64-DAG: define          dllexport                void @"\01?privateDef@Nested@ExportMembers@@AEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
219*0a6a1f1dSLionel Sambuc   // G32-DAG: define          dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10privateDefEv(%"struct.ExportMembers::Nested"* %this)
220*0a6a1f1dSLionel Sambuc   // G64-DAG: define          dllexport                void @_ZN13ExportMembers6Nested10privateDefEv(%"struct.ExportMembers::Nested"* %this)
221*0a6a1f1dSLionel Sambuc   // MSC-DAG: define          dllexport                void @"\01?privateStaticDef@Nested@ExportMembers@@CAXXZ"()
222*0a6a1f1dSLionel Sambuc   // GNU-DAG: define          dllexport                void @_ZN13ExportMembers6Nested16privateStaticDefEv()
223*0a6a1f1dSLionel Sambuc private:
224*0a6a1f1dSLionel Sambuc   __declspec(dllexport)                void privateDef();
225*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         void privateStaticDef();
226*0a6a1f1dSLionel Sambuc 
227*0a6a1f1dSLionel Sambuc   // M32-DAG: define                    x86_thiscallcc void @"\01?ignored@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
228*0a6a1f1dSLionel Sambuc   // M64-DAG: define                                   void @"\01?ignored@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
229*0a6a1f1dSLionel Sambuc   // G32-DAG: define                    x86_thiscallcc void @_ZN13ExportMembers6Nested7ignoredEv(%"struct.ExportMembers::Nested"* %this)
230*0a6a1f1dSLionel Sambuc   // G64-DAG: define                                   void @_ZN13ExportMembers6Nested7ignoredEv(%"struct.ExportMembers::Nested"* %this)
231*0a6a1f1dSLionel Sambuc public:
232*0a6a1f1dSLionel Sambuc   void ignored();
233*0a6a1f1dSLionel Sambuc 
234*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticField@Nested@ExportMembers@@2HA"               = dllexport global i32 1, align 4
235*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstField@Nested@ExportMembers@@2HB"          = dllexport constant i32 1, align 4
236*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldEqualInit@Nested@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
237*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldBraceInit@Nested@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
238*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?ConstexprField@Nested@ExportMembers@@2HB"            = weak_odr dllexport constant i32 1, align 4
239*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers6Nested11StaticFieldE                   = dllexport global i32 1, align 4
240*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers6Nested16StaticConstFieldE              = dllexport constant i32 1, align 4
241*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers6Nested25StaticConstFieldEqualInitE     = dllexport constant i32 1, align 4
242*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers6Nested25StaticConstFieldBraceInitE     = dllexport constant i32 1, align 4
243*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ExportMembers6Nested14ConstexprFieldE                = dllexport constant i32 1, align 4
244*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static         int  StaticField;
245*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  const  int  StaticConstField;
246*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  const  int  StaticConstFieldEqualInit = 1;
247*0a6a1f1dSLionel Sambuc   __declspec(dllexport) static  const  int  StaticConstFieldBraceInit{1};
248*0a6a1f1dSLionel Sambuc   __declspec(dllexport) constexpr static int ConstexprField = 1;
249*0a6a1f1dSLionel Sambuc };
250*0a6a1f1dSLionel Sambuc 
normalDef()251*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::normalDef() {}
normalInlineDef()252*0a6a1f1dSLionel Sambuc inline void ExportMembers::Nested::normalInlineDef() {}
normalInlineDecl()253*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::normalInlineDecl() {}
virtualDef()254*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::virtualDef() {}
virtualInlineDef()255*0a6a1f1dSLionel Sambuc inline void ExportMembers::Nested::virtualInlineDef() {}
virtualInlineDecl()256*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::virtualInlineDecl() {}
staticDef()257*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::staticDef() {}
staticInlineDef()258*0a6a1f1dSLionel Sambuc inline void ExportMembers::Nested::staticInlineDef() {}
staticInlineDecl()259*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::staticInlineDecl() {}
ignored()260*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::ignored() {}
protectedDef()261*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::protectedDef() {}
protectedStaticDef()262*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::protectedStaticDef() {}
privateDef()263*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::privateDef() {}
privateStaticDef()264*0a6a1f1dSLionel Sambuc        void ExportMembers::Nested::privateStaticDef() {}
265*0a6a1f1dSLionel Sambuc 
266*0a6a1f1dSLionel Sambuc        int  ExportMembers::Nested::StaticField = 1;
267*0a6a1f1dSLionel Sambuc const  int  ExportMembers::Nested::StaticConstField = 1;
268*0a6a1f1dSLionel Sambuc const  int  ExportMembers::Nested::StaticConstFieldEqualInit;
269*0a6a1f1dSLionel Sambuc const  int  ExportMembers::Nested::StaticConstFieldBraceInit;
270*0a6a1f1dSLionel Sambuc constexpr int ExportMembers::Nested::ConstexprField;
271*0a6a1f1dSLionel Sambuc 
272*0a6a1f1dSLionel Sambuc 
273*0a6a1f1dSLionel Sambuc // Export special member functions.
274*0a6a1f1dSLionel Sambuc struct ExportSpecials {
275*0a6a1f1dSLionel Sambuc   // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@XZ"(%struct.ExportSpecials* returned %this)
276*0a6a1f1dSLionel Sambuc   // M64-DAG: define dllexport                %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@XZ"(%struct.ExportSpecials* returned %this)
277*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1Ev(%struct.ExportSpecials* %this)
278*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsC1Ev(%struct.ExportSpecials* %this)
279*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2Ev(%struct.ExportSpecials* %this)
280*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsC2Ev(%struct.ExportSpecials* %this)
281*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportSpecials();
282*0a6a1f1dSLionel Sambuc 
283*0a6a1f1dSLionel Sambuc   // M32-DAG: define dllexport x86_thiscallcc void @"\01??1ExportSpecials@@QAE@XZ"(%struct.ExportSpecials* %this)
284*0a6a1f1dSLionel Sambuc   // M64-DAG: define dllexport                void @"\01??1ExportSpecials@@QEAA@XZ"(%struct.ExportSpecials* %this)
285*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsD1Ev(%struct.ExportSpecials* %this)
286*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsD1Ev(%struct.ExportSpecials* %this)
287*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* %this)
288*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* %this)
289*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ~ExportSpecials();
290*0a6a1f1dSLionel Sambuc 
291*0a6a1f1dSLionel Sambuc   // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@ABU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
292*0a6a1f1dSLionel Sambuc   // M64-DAG: define dllexport                %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@AEBU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
293*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
294*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
295*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
296*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
297*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportSpecials(const ExportSpecials&);
298*0a6a1f1dSLionel Sambuc 
299*0a6a1f1dSLionel Sambuc   // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0@ABU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
300*0a6a1f1dSLionel Sambuc   // M64-DAG: define dllexport                dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0@AEBU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
301*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
302*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
303*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&);
304*0a6a1f1dSLionel Sambuc 
305*0a6a1f1dSLionel Sambuc   // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@$$QAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
306*0a6a1f1dSLionel Sambuc   // M64-DAG: define dllexport                %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
307*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
308*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
309*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
310*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
311*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportSpecials(ExportSpecials&&);
312*0a6a1f1dSLionel Sambuc 
313*0a6a1f1dSLionel Sambuc   // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
314*0a6a1f1dSLionel Sambuc   // M64-DAG: define dllexport                dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
315*0a6a1f1dSLionel Sambuc   // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
316*0a6a1f1dSLionel Sambuc   // G64-DAG: define dllexport                dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
317*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&);
318*0a6a1f1dSLionel Sambuc };
ExportSpecials()319*0a6a1f1dSLionel Sambuc ExportSpecials::ExportSpecials() {}
~ExportSpecials()320*0a6a1f1dSLionel Sambuc ExportSpecials::~ExportSpecials() {}
ExportSpecials(const ExportSpecials &)321*0a6a1f1dSLionel Sambuc ExportSpecials::ExportSpecials(const ExportSpecials&) {}
operator =(const ExportSpecials &)322*0a6a1f1dSLionel Sambuc ExportSpecials& ExportSpecials::operator=(const ExportSpecials&) { return *this; }
ExportSpecials(ExportSpecials &&)323*0a6a1f1dSLionel Sambuc ExportSpecials::ExportSpecials(ExportSpecials&&) {}
operator =(ExportSpecials &&)324*0a6a1f1dSLionel Sambuc ExportSpecials& ExportSpecials::operator=(ExportSpecials&&) { return *this; }
325*0a6a1f1dSLionel Sambuc 
326*0a6a1f1dSLionel Sambuc 
327*0a6a1f1dSLionel Sambuc // Export class with inline special member functions.
328*0a6a1f1dSLionel Sambuc struct ExportInlineSpecials {
329*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@XZ"(%struct.ExportInlineSpecials* returned %this)
330*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QEAA@XZ"(
331*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1Ev(
332*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN20ExportInlineSpecialsC1Ev(
ExportInlineSpecialsExportInlineSpecials333*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportInlineSpecials() {}
334*0a6a1f1dSLionel Sambuc 
335*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??1ExportInlineSpecials@@QAE@XZ"(
336*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01??1ExportInlineSpecials@@QEAA@XZ"(
337*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsD1Ev(
338*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN20ExportInlineSpecialsD1Ev(
~ExportInlineSpecialsExportInlineSpecials339*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ~ExportInlineSpecials() {}
340*0a6a1f1dSLionel Sambuc 
341*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@ABU0@@Z"(
342*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QEAA@AEBU0@@Z"(
343*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1ERKS_(
344*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN20ExportInlineSpecialsC1ERKS_(
345*0a6a1f1dSLionel Sambuc   __declspec(dllexport) inline ExportInlineSpecials(const ExportInlineSpecials&);
346*0a6a1f1dSLionel Sambuc 
347*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0@ABU0@@Z"(
348*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"(
349*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
350*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
351*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportInlineSpecials& operator=(const ExportInlineSpecials&);
352*0a6a1f1dSLionel Sambuc 
353*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@$$QAU0@@Z"(
354*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QEAA@$$QEAU0@@Z"(
355*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1EOS_(
356*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN20ExportInlineSpecialsC1EOS_(
ExportInlineSpecialsExportInlineSpecials357*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportInlineSpecials(ExportInlineSpecials&&) {}
358*0a6a1f1dSLionel Sambuc 
359*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
360*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
361*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
362*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
operator =ExportInlineSpecials363*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportInlineSpecials& operator=(ExportInlineSpecials&&) { return *this; }
364*0a6a1f1dSLionel Sambuc };
ExportInlineSpecials(const ExportInlineSpecials &)365*0a6a1f1dSLionel Sambuc ExportInlineSpecials::ExportInlineSpecials(const ExportInlineSpecials&) {}
operator =(const ExportInlineSpecials &)366*0a6a1f1dSLionel Sambuc inline ExportInlineSpecials& ExportInlineSpecials::operator=(const ExportInlineSpecials&) { return *this; }
367*0a6a1f1dSLionel Sambuc 
368*0a6a1f1dSLionel Sambuc 
369*0a6a1f1dSLionel Sambuc // Export defaulted member function definitions.
370*0a6a1f1dSLionel Sambuc struct ExportDefaultedDefs {
371*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportDefaultedDefs();
372*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ~ExportDefaultedDefs();
373*0a6a1f1dSLionel Sambuc   __declspec(dllexport) inline ExportDefaultedDefs(const ExportDefaultedDefs&);
374*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportDefaultedDefs& operator=(const ExportDefaultedDefs&);
375*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportDefaultedDefs(ExportDefaultedDefs&&);
376*0a6a1f1dSLionel Sambuc   __declspec(dllexport) ExportDefaultedDefs& operator=(ExportDefaultedDefs&&);
377*0a6a1f1dSLionel Sambuc };
378*0a6a1f1dSLionel Sambuc 
379*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@XZ"(%struct.ExportDefaultedDefs* returned %this)
380*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport                %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@XZ"(%struct.ExportDefaultedDefs* returned %this)
381*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1Ev(%struct.ExportDefaultedDefs* %this)
382*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                void @_ZN19ExportDefaultedDefsC1Ev(%struct.ExportDefaultedDefs* %this)
383*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2Ev(%struct.ExportDefaultedDefs* %this)
384*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                void @_ZN19ExportDefaultedDefsC2Ev(%struct.ExportDefaultedDefs* %this)
385*0a6a1f1dSLionel Sambuc __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs() = default;
386*0a6a1f1dSLionel Sambuc 
387*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport x86_thiscallcc void @"\01??1ExportDefaultedDefs@@QAE@XZ"(%struct.ExportDefaultedDefs* %this)
388*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport                void @"\01??1ExportDefaultedDefs@@QEAA@XZ"(%struct.ExportDefaultedDefs* %this)
389*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD1Ev(%struct.ExportDefaultedDefs* %this)
390*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                void @_ZN19ExportDefaultedDefsD1Ev(%struct.ExportDefaultedDefs* %this)
391*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* %this)
392*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* %this)
393*0a6a1f1dSLionel Sambuc ExportDefaultedDefs::~ExportDefaultedDefs() = default;
394*0a6a1f1dSLionel Sambuc 
395*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@ABU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
396*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@AEBU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
397*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
398*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
399*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
400*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
401*0a6a1f1dSLionel Sambuc __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default;
402*0a6a1f1dSLionel Sambuc 
403*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0@ABU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
404*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
405*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
406*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
407*0a6a1f1dSLionel Sambuc inline ExportDefaultedDefs& ExportDefaultedDefs::operator=(const ExportDefaultedDefs&) = default;
408*0a6a1f1dSLionel Sambuc 
409*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
410*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport                %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
411*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
412*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
413*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
414*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
415*0a6a1f1dSLionel Sambuc __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default;
416*0a6a1f1dSLionel Sambuc 
417*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
418*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport                dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
419*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
420*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport                dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
421*0a6a1f1dSLionel Sambuc ExportDefaultedDefs& ExportDefaultedDefs::operator=(ExportDefaultedDefs&&) = default;
422*0a6a1f1dSLionel Sambuc 
423*0a6a1f1dSLionel Sambuc 
424*0a6a1f1dSLionel Sambuc // Export allocation functions.
425*0a6a1f1dSLionel Sambuc struct ExportAlloc {
426*0a6a1f1dSLionel Sambuc   __declspec(dllexport) void* operator new(__SIZE_TYPE__);
427*0a6a1f1dSLionel Sambuc   __declspec(dllexport) void* operator new[](__SIZE_TYPE__);
428*0a6a1f1dSLionel Sambuc   __declspec(dllexport) void operator delete(void*);
429*0a6a1f1dSLionel Sambuc   __declspec(dllexport) void operator delete[](void*);
430*0a6a1f1dSLionel Sambuc };
431*0a6a1f1dSLionel Sambuc 
432*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport i8* @"\01??2ExportAlloc@@SAPAXI@Z"(i32 %n)
433*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport i8* @"\01??2ExportAlloc@@SAPEAX_K@Z"(i64 %n)
434*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport i8* @_ZN11ExportAllocnwEj(i32 %n)
435*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport i8* @_ZN11ExportAllocnwEy(i64 %n)
operator new(__SIZE_TYPE__ n)436*0a6a1f1dSLionel Sambuc void* ExportAlloc::operator new(__SIZE_TYPE__ n) { return malloc(n); }
437*0a6a1f1dSLionel Sambuc 
438*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport i8* @"\01??_UExportAlloc@@SAPAXI@Z"(i32 %n)
439*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport i8* @"\01??_UExportAlloc@@SAPEAX_K@Z"(i64 %n)
440*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport i8* @_ZN11ExportAllocnaEj(i32 %n)
441*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport i8* @_ZN11ExportAllocnaEy(i64 %n)
operator new[](__SIZE_TYPE__ n)442*0a6a1f1dSLionel Sambuc void* ExportAlloc::operator new[](__SIZE_TYPE__ n) { return malloc(n); }
443*0a6a1f1dSLionel Sambuc 
444*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport void @"\01??3ExportAlloc@@SAXPAX@Z"(i8* %p)
445*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport void @"\01??3ExportAlloc@@SAXPEAX@Z"(i8* %p)
446*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport void @_ZN11ExportAllocdlEPv(i8* %p)
447*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport void @_ZN11ExportAllocdlEPv(i8* %p)
operator delete(void * p)448*0a6a1f1dSLionel Sambuc void ExportAlloc::operator delete(void* p) { free(p); }
449*0a6a1f1dSLionel Sambuc 
450*0a6a1f1dSLionel Sambuc // M32-DAG: define dllexport void @"\01??_VExportAlloc@@SAXPAX@Z"(i8* %p)
451*0a6a1f1dSLionel Sambuc // M64-DAG: define dllexport void @"\01??_VExportAlloc@@SAXPEAX@Z"(i8* %p)
452*0a6a1f1dSLionel Sambuc // G32-DAG: define dllexport void @_ZN11ExportAllocdaEPv(i8* %p)
453*0a6a1f1dSLionel Sambuc // G64-DAG: define dllexport void @_ZN11ExportAllocdaEPv(i8* %p)
operator delete[](void * p)454*0a6a1f1dSLionel Sambuc void ExportAlloc::operator delete[](void* p) { free(p); }
455*0a6a1f1dSLionel Sambuc 
456*0a6a1f1dSLionel Sambuc 
457*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
458*0a6a1f1dSLionel Sambuc // Class member templates
459*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
460*0a6a1f1dSLionel Sambuc 
461*0a6a1f1dSLionel Sambuc struct MemFunTmpl {
normalDefMemFunTmpl462*0a6a1f1dSLionel Sambuc   template<typename T>                              void normalDef() {}
exportedNormalMemFunTmpl463*0a6a1f1dSLionel Sambuc   template<typename T> __declspec(dllexport)        void exportedNormal() {}
staticDefMemFunTmpl464*0a6a1f1dSLionel Sambuc   template<typename T>                       static void staticDef() {}
exportedStaticMemFunTmpl465*0a6a1f1dSLionel Sambuc   template<typename T> __declspec(dllexport) static void exportedStatic() {}
466*0a6a1f1dSLionel Sambuc };
467*0a6a1f1dSLionel Sambuc 
468*0a6a1f1dSLionel Sambuc // Export implicit instantiation of an exported member function template.
useMemFunTmpl()469*0a6a1f1dSLionel Sambuc void useMemFunTmpl() {
470*0a6a1f1dSLionel Sambuc   // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
471*0a6a1f1dSLionel Sambuc   // M64-DAG: define weak_odr dllexport                void @"\01??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
472*0a6a1f1dSLionel Sambuc   // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
473*0a6a1f1dSLionel Sambuc   // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
474*0a6a1f1dSLionel Sambuc   MemFunTmpl().exportedNormal<ImplicitInst_Exported>();
475*0a6a1f1dSLionel Sambuc 
476*0a6a1f1dSLionel Sambuc   // MSC-DAG: define weak_odr dllexport                void @"\01??$exportedStatic@UImplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
477*0a6a1f1dSLionel Sambuc   // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedStaticI21ImplicitInst_ExportedEEvv()
478*0a6a1f1dSLionel Sambuc   MemFunTmpl().exportedStatic<ImplicitInst_Exported>();
479*0a6a1f1dSLionel Sambuc }
480*0a6a1f1dSLionel Sambuc 
481*0a6a1f1dSLionel Sambuc 
482*0a6a1f1dSLionel Sambuc // Export explicit instantiation declaration of an exported member function
483*0a6a1f1dSLionel Sambuc // template.
484*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
485*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                void @"\01??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
486*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
487*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
488*0a6a1f1dSLionel Sambuc extern template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
489*0a6a1f1dSLionel Sambuc        template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
490*0a6a1f1dSLionel Sambuc 
491*0a6a1f1dSLionel Sambuc // MSC-DAG: define weak_odr dllexport                void @"\01??$exportedStatic@UExplicitDecl_Exported@@@MemFunTmpl@@SAXXZ"()
492*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedStaticI21ExplicitDecl_ExportedEEvv()
493*0a6a1f1dSLionel Sambuc extern template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
494*0a6a1f1dSLionel Sambuc        template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
495*0a6a1f1dSLionel Sambuc 
496*0a6a1f1dSLionel Sambuc 
497*0a6a1f1dSLionel Sambuc // Export explicit instantiation definition of an exported member function
498*0a6a1f1dSLionel Sambuc // template.
499*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
500*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                void @"\01??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
501*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
502*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
503*0a6a1f1dSLionel Sambuc template void MemFunTmpl::exportedNormal<ExplicitInst_Exported>();
504*0a6a1f1dSLionel Sambuc 
505*0a6a1f1dSLionel Sambuc // MSC-DAG: define weak_odr dllexport                void @"\01??$exportedStatic@UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
506*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedStaticI21ExplicitInst_ExportedEEvv()
507*0a6a1f1dSLionel Sambuc template void MemFunTmpl::exportedStatic<ExplicitInst_Exported>();
508*0a6a1f1dSLionel Sambuc 
509*0a6a1f1dSLionel Sambuc 
510*0a6a1f1dSLionel Sambuc // Export specialization of an exported member function template.
511*0a6a1f1dSLionel Sambuc // M32-DAG: define          dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
512*0a6a1f1dSLionel Sambuc // M64-DAG: define          dllexport                void @"\01??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
513*0a6a1f1dSLionel Sambuc // G32-DAG: define          dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
514*0a6a1f1dSLionel Sambuc // G64-DAG: define          dllexport                void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
exportedNormal()515*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Def_Exported>() {}
516*0a6a1f1dSLionel Sambuc 
517*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
518*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                void @"\01??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
519*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
520*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
exportedNormal()521*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) inline void MemFunTmpl::exportedNormal<ExplicitSpec_InlineDef_Exported>() {}
522*0a6a1f1dSLionel Sambuc 
523*0a6a1f1dSLionel Sambuc // MSC-DAG: define          dllexport                void @"\01??$exportedStatic@UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
524*0a6a1f1dSLionel Sambuc // GNU-DAG: define          dllexport                void @_ZN10MemFunTmpl14exportedStaticI25ExplicitSpec_Def_ExportedEEvv()
exportedStatic()525*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) void MemFunTmpl::exportedStatic<ExplicitSpec_Def_Exported>() {}
526*0a6a1f1dSLionel Sambuc 
527*0a6a1f1dSLionel Sambuc // MSC-DAG: define weak_odr dllexport                void @"\01??$exportedStatic@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@SAXXZ"()
528*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl14exportedStaticI31ExplicitSpec_InlineDef_ExportedEEvv()
exportedStatic()529*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) inline void MemFunTmpl::exportedStatic<ExplicitSpec_InlineDef_Exported>() {}
530*0a6a1f1dSLionel Sambuc 
531*0a6a1f1dSLionel Sambuc 
532*0a6a1f1dSLionel Sambuc // Not exporting specialization of an exported member function template without
533*0a6a1f1dSLionel Sambuc // explicit dllexport.
534*0a6a1f1dSLionel Sambuc // M32-DAG: define                    x86_thiscallcc void @"\01??$exportedNormal@UExplicitSpec_NotExported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
535*0a6a1f1dSLionel Sambuc // M64-DAG: define                                   void @"\01??$exportedNormal@UExplicitSpec_NotExported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
536*0a6a1f1dSLionel Sambuc // G32-DAG: define                    x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(%struct.MemFunTmpl* %this)
537*0a6a1f1dSLionel Sambuc // G64-DAG: define                                   void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(%struct.MemFunTmpl* %this)
exportedNormal()538*0a6a1f1dSLionel Sambuc template<> void MemFunTmpl::exportedNormal<ExplicitSpec_NotExported>() {}
539*0a6a1f1dSLionel Sambuc 
540*0a6a1f1dSLionel Sambuc // M32-DAG: define                                   void @"\01??$exportedStatic@UExplicitSpec_NotExported@@@MemFunTmpl@@SAXXZ"()
541*0a6a1f1dSLionel Sambuc // GNU-DAG: define                                   void @_ZN10MemFunTmpl14exportedStaticI24ExplicitSpec_NotExportedEEvv()
exportedStatic()542*0a6a1f1dSLionel Sambuc template<> void MemFunTmpl::exportedStatic<ExplicitSpec_NotExported>() {}
543*0a6a1f1dSLionel Sambuc 
544*0a6a1f1dSLionel Sambuc 
545*0a6a1f1dSLionel Sambuc // Export explicit instantiation declaration of a non-exported member function
546*0a6a1f1dSLionel Sambuc // template.
547*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
548*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                void @"\01??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
549*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
550*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
551*0a6a1f1dSLionel Sambuc extern template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
552*0a6a1f1dSLionel Sambuc        template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
553*0a6a1f1dSLionel Sambuc 
554*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport                void @"\01??$staticDef@UExplicitDecl_Exported@@@MemFunTmpl@@SAXXZ"()
555*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl9staticDefI21ExplicitDecl_ExportedEEvv()
556*0a6a1f1dSLionel Sambuc extern template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
557*0a6a1f1dSLionel Sambuc        template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
558*0a6a1f1dSLionel Sambuc 
559*0a6a1f1dSLionel Sambuc 
560*0a6a1f1dSLionel Sambuc // Export explicit instantiation definition of a non-exported member function
561*0a6a1f1dSLionel Sambuc // template.
562*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
563*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                void @"\01??$normalDef@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
564*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
565*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
566*0a6a1f1dSLionel Sambuc template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitInst_Exported>();
567*0a6a1f1dSLionel Sambuc 
568*0a6a1f1dSLionel Sambuc // MSC-DAG: define weak_odr dllexport                void @"\01??$staticDef@UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
569*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl9staticDefI21ExplicitInst_ExportedEEvv()
570*0a6a1f1dSLionel Sambuc template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitInst_Exported>();
571*0a6a1f1dSLionel Sambuc 
572*0a6a1f1dSLionel Sambuc 
573*0a6a1f1dSLionel Sambuc // Export specialization of a non-exported member function template.
574*0a6a1f1dSLionel Sambuc // M32-DAG: define          dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
575*0a6a1f1dSLionel Sambuc // M64-DAG: define          dllexport                void @"\01??$normalDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
576*0a6a1f1dSLionel Sambuc // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
577*0a6a1f1dSLionel Sambuc // M64-DAG: define weak_odr dllexport                void @"\01??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
578*0a6a1f1dSLionel Sambuc // G32-DAG: define          dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
579*0a6a1f1dSLionel Sambuc // G64-DAG: define          dllexport                void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
580*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
581*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
normalDef()582*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Exported>() {}
normalDef()583*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Exported>() {}
584*0a6a1f1dSLionel Sambuc 
585*0a6a1f1dSLionel Sambuc // MSC-DAG: define          dllexport                void @"\01??$staticDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
586*0a6a1f1dSLionel Sambuc // MSC-DAG: define weak_odr dllexport                void @"\01??$staticDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@SAXXZ"()
587*0a6a1f1dSLionel Sambuc // GNU-DAG: define          dllexport                void @_ZN10MemFunTmpl9staticDefI25ExplicitSpec_Def_ExportedEEvv()
588*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr dllexport                void @_ZN10MemFunTmpl9staticDefI31ExplicitSpec_InlineDef_ExportedEEvv()
staticDef()589*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Exported>() {}
staticDef()590*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Exported>() {}
591*0a6a1f1dSLionel Sambuc 
592*0a6a1f1dSLionel Sambuc 
593*0a6a1f1dSLionel Sambuc 
594*0a6a1f1dSLionel Sambuc struct MemVarTmpl {
595*0a6a1f1dSLionel Sambuc   template<typename T>                       static const int StaticVar = 1;
596*0a6a1f1dSLionel Sambuc   template<typename T> __declspec(dllexport) static const int ExportedStaticVar = 1;
597*0a6a1f1dSLionel Sambuc };
598*0a6a1f1dSLionel Sambuc template<typename T> const int MemVarTmpl::StaticVar;
599*0a6a1f1dSLionel Sambuc template<typename T> const int MemVarTmpl::ExportedStaticVar;
600*0a6a1f1dSLionel Sambuc 
601*0a6a1f1dSLionel Sambuc // Export implicit instantiation of an exported member variable template.
602*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ExportedStaticVar@UImplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
603*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ImplicitInst_ExportedEE       = weak_odr dllexport constant i32 1, align 4
useMemVarTmpl()604*0a6a1f1dSLionel Sambuc int useMemVarTmpl() { return MemVarTmpl::ExportedStaticVar<ImplicitInst_Exported>; }
605*0a6a1f1dSLionel Sambuc 
606*0a6a1f1dSLionel Sambuc // Export explicit instantiation declaration of an exported member variable
607*0a6a1f1dSLionel Sambuc // template.
608*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ExportedStaticVar@UExplicitDecl_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
609*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ExplicitDecl_ExportedEE       = weak_odr dllexport constant i32 1, align 4
610*0a6a1f1dSLionel Sambuc extern template const int MemVarTmpl::ExportedStaticVar<ExplicitDecl_Exported>;
611*0a6a1f1dSLionel Sambuc        template const int MemVarTmpl::ExportedStaticVar<ExplicitDecl_Exported>;
612*0a6a1f1dSLionel Sambuc 
613*0a6a1f1dSLionel Sambuc // Export explicit instantiation definition of an exported member variable
614*0a6a1f1dSLionel Sambuc // template.
615*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ExportedStaticVar@UExplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
616*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ExplicitInst_ExportedEE       = weak_odr dllexport constant i32 1, align 4
617*0a6a1f1dSLionel Sambuc template const int MemVarTmpl::ExportedStaticVar<ExplicitInst_Exported>;
618*0a6a1f1dSLionel Sambuc 
619*0a6a1f1dSLionel Sambuc // Export specialization of an exported member variable template.
620*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ExportedStaticVar@UExplicitSpec_Def_Exported@@@MemVarTmpl@@2HB" = dllexport constant i32 1, align 4
621*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI25ExplicitSpec_Def_ExportedEE       = dllexport constant i32 1, align 4
622*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_Def_Exported> = 1;
623*0a6a1f1dSLionel Sambuc 
624*0a6a1f1dSLionel Sambuc // Not exporting specialization of an exported member variable template without
625*0a6a1f1dSLionel Sambuc // explicit dllexport.
626*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ExportedStaticVar@UExplicitSpec_NotExported@@@MemVarTmpl@@2HB" = constant i32 1, align 4
627*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI24ExplicitSpec_NotExportedEE       = constant i32 1, align 4
628*0a6a1f1dSLionel Sambuc template<> const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_NotExported> = 1;
629*0a6a1f1dSLionel Sambuc 
630*0a6a1f1dSLionel Sambuc 
631*0a6a1f1dSLionel Sambuc // Export explicit instantiation declaration of a non-exported member variable
632*0a6a1f1dSLionel Sambuc // template.
633*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$StaticVar@UExplicitDecl_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
634*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitDecl_ExportedEE        = weak_odr dllexport constant i32 1, align 4
635*0a6a1f1dSLionel Sambuc extern template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
636*0a6a1f1dSLionel Sambuc        template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
637*0a6a1f1dSLionel Sambuc 
638*0a6a1f1dSLionel Sambuc // Export explicit instantiation definition of a non-exported member variable
639*0a6a1f1dSLionel Sambuc // template.
640*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$StaticVar@UExplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
641*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitInst_ExportedEE        = weak_odr dllexport constant i32 1, align 4
642*0a6a1f1dSLionel Sambuc template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitInst_Exported>;
643*0a6a1f1dSLionel Sambuc 
644*0a6a1f1dSLionel Sambuc // Export specialization of a non-exported member variable template.
645*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$StaticVar@UExplicitSpec_Def_Exported@@@MemVarTmpl@@2HB" = dllexport constant i32 1, align 4
646*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI25ExplicitSpec_Def_ExportedEE        = dllexport constant i32 1, align 4
647*0a6a1f1dSLionel Sambuc template<> __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitSpec_Def_Exported> = 1;
648