1 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc -fms-compatibility -fms-compatibility-version=18 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M32 %s
2 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=18 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M64 %s
3 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M32VS2015 %s
4 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M64VS2015 %s
5 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
6 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
8 // Helper structs to make templates more expressive.
9 struct ImplicitInst_Exported
{};
10 struct ExplicitDecl_Exported
{};
11 struct ExplicitInst_Exported
{};
12 struct ExplicitSpec_Exported
{};
13 struct ExplicitSpec_Def_Exported
{};
14 struct ExplicitSpec_InlineDef_Exported
{};
15 struct ExplicitSpec_NotExported
{};
17 extern "C" void* malloc(__SIZE_TYPE__ size
);
18 extern "C" void free(void* p
);
21 //===----------------------------------------------------------------------===//
23 //===----------------------------------------------------------------------===//
25 // Export individual members of a class.
26 struct ExportMembers
{
29 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?normalDef@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
30 // M64-DAG: define dso_local dllexport void @"?normalDef@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
31 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInclass@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
32 // M64-DAG: define weak_odr dso_local dllexport void @"?normalInclass@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
33 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDef@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
34 // M64-DAG: define weak_odr dso_local dllexport void @"?normalInlineDef@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
35 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
36 // M64-DAG: define weak_odr dso_local dllexport void @"?normalInlineDecl@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
37 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this)
38 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this)
39 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this)
40 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this)
41 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this)
42 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this)
43 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this)
44 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this)
45 // M32-DAG: define linkonce_odr dso_local x86_thiscallcc void @"?referencedNonExportedInClass@ExportMembers@@QAEXXZ"
46 __declspec(dllexport
) void normalDef();
47 __declspec(dllexport
) void normalInclass() { referencedNonExportedInClass(); }
48 __declspec(dllexport
) void normalInlineDef();
49 __declspec(dllexport
) inline void normalInlineDecl();
50 void referencedNonExportedInClass() {}
52 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?virtualDef@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
53 // M64-DAG: define dso_local dllexport void @"?virtualDef@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
54 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInclass@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
55 // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInclass@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
56 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDef@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
57 // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInlineDef@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
58 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
59 // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInlineDecl@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
60 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this)
61 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this)
62 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this)
63 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this)
64 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this)
65 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this)
66 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this)
67 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this)
68 __declspec(dllexport
) virtual void virtualDef();
69 __declspec(dllexport
) virtual void virtualInclass() {}
70 __declspec(dllexport
) virtual void virtualInlineDef();
71 __declspec(dllexport
) virtual inline void virtualInlineDecl();
73 // MSC-DAG: define dso_local dllexport void @"?staticDef@ExportMembers@@SAXXZ"()
74 // MSC-DAG: define weak_odr dso_local dllexport void @"?staticInclass@ExportMembers@@SAXXZ"()
75 // MSC-DAG: define weak_odr dso_local dllexport void @"?staticInlineDef@ExportMembers@@SAXXZ"()
76 // MSC-DAG: define weak_odr dso_local dllexport void @"?staticInlineDecl@ExportMembers@@SAXXZ"()
77 // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers9staticDefEv()
78 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers13staticInclassEv()
79 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers15staticInlineDefEv()
80 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers16staticInlineDeclEv()
81 __declspec(dllexport
) static void staticDef();
82 __declspec(dllexport
) static void staticInclass() {}
83 __declspec(dllexport
) static void staticInlineDef();
84 __declspec(dllexport
) static inline void staticInlineDecl();
86 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?protectedDef@ExportMembers@@IAEXXZ"(ptr {{[^,]*}} %this)
87 // M64-DAG: define dso_local dllexport void @"?protectedDef@ExportMembers@@IEAAXXZ"(ptr {{[^,]*}} %this)
88 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this)
89 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this)
90 // MSC-DAG: define dso_local dllexport void @"?protectedStaticDef@ExportMembers@@KAXXZ"()
91 // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers18protectedStaticDefEv()
93 __declspec(dllexport
) void protectedDef();
94 __declspec(dllexport
) static void protectedStaticDef();
96 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?privateDef@ExportMembers@@AAEXXZ"(ptr {{[^,]*}} %this)
97 // M64-DAG: define dso_local dllexport void @"?privateDef@ExportMembers@@AEAAXXZ"(ptr {{[^,]*}} %this)
98 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this)
99 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this)
100 // MSC-DAG: define dso_local dllexport void @"?privateStaticDef@ExportMembers@@CAXXZ"()
101 // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers16privateStaticDefEv()
103 __declspec(dllexport
) void privateDef();
104 __declspec(dllexport
) static void privateStaticDef();
106 // M32-DAG: define dso_local x86_thiscallcc void @"?ignored@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
107 // M64-DAG: define dso_local void @"?ignored@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
108 // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this)
109 // G64-DAG: define dso_local void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this)
113 // MSC-DAG: @"?StaticField@ExportMembers@@2HA" = dso_local dllexport global i32 1, align 4
114 // MSC-DAG: @"?StaticConstField@ExportMembers@@2HB" = dso_local dllexport constant i32 1, align 4
115 // MSC-DAG: @"?StaticConstFieldEqualInit@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
116 // MSC-DAG: @"?StaticConstFieldBraceInit@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
117 // MSC-DAG: @"?StaticConstFieldRefNotDef@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
118 // MSC-DAG: @"?ConstexprField@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
119 // GNU-DAG: @_ZN13ExportMembers11StaticFieldE = dso_local dllexport global i32 1, align 4
120 // GNU-DAG: @_ZN13ExportMembers16StaticConstFieldE = dso_local dllexport constant i32 1, align 4
121 // GNU-DAG: @_ZN13ExportMembers25StaticConstFieldEqualInitE = dso_local dllexport constant i32 1, align 4
122 // GNU-DAG: @_ZN13ExportMembers25StaticConstFieldBraceInitE = dso_local dllexport constant i32 1, align 4
123 // GNU-DAG: @_ZN13ExportMembers14ConstexprFieldE = dso_local dllexport constant i32 1, align 4
124 __declspec(dllexport
) static int StaticField
;
125 __declspec(dllexport
) static const int StaticConstField
;
126 __declspec(dllexport
) static const int StaticConstFieldEqualInit
= 1;
127 __declspec(dllexport
) static const int StaticConstFieldBraceInit
{1};
128 __declspec(dllexport
) static const int StaticConstFieldRefNotDef
= 1;
129 __declspec(dllexport
) constexpr static int ConstexprField
= 1;
132 void ExportMembers::normalDef() {}
133 inline void ExportMembers::normalInlineDef() {}
134 void ExportMembers::normalInlineDecl() {}
135 void ExportMembers::virtualDef() {}
136 inline void ExportMembers::virtualInlineDef() {}
137 void ExportMembers::virtualInlineDecl() {}
138 void ExportMembers::staticDef() {}
139 inline void ExportMembers::staticInlineDef() {}
140 void ExportMembers::staticInlineDecl() {}
141 void ExportMembers::ignored() {}
142 void ExportMembers::protectedDef() {}
143 void ExportMembers::protectedStaticDef() {}
144 void ExportMembers::privateDef() {}
145 void ExportMembers::privateStaticDef() {}
147 int ExportMembers::StaticField
= 1;
148 const int ExportMembers::StaticConstField
= 1;
149 const int ExportMembers::StaticConstFieldEqualInit
;
150 const int ExportMembers::StaticConstFieldBraceInit
;
151 int foo() { return ExportMembers::StaticConstFieldRefNotDef
; }
152 constexpr int ExportMembers::ConstexprField
;
155 // Export individual members of a nested class.
156 struct ExportMembers::Nested
{
157 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?normalDef@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
158 // M64-DAG: define dso_local dllexport void @"?normalDef@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
159 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInclass@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
160 // M64-DAG: define weak_odr dso_local dllexport void @"?normalInclass@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
161 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDef@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
162 // M64-DAG: define weak_odr dso_local dllexport void @"?normalInlineDef@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
163 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
164 // M64-DAG: define weak_odr dso_local dllexport void @"?normalInlineDecl@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
165 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this)
166 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this)
167 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this)
168 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this)
169 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this)
170 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this)
171 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this)
172 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this)
173 __declspec(dllexport
) void normalDef();
174 __declspec(dllexport
) void normalInclass() {}
175 __declspec(dllexport
) void normalInlineDef();
176 __declspec(dllexport
) inline void normalInlineDecl();
178 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?virtualDef@Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
179 // M64-DAG: define dso_local dllexport void @"?virtualDef@Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
180 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInclass@Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
181 // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInclass@Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
182 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDef@Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
183 // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInlineDef@Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
184 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl@Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
185 // M64-DAG: define weak_odr dso_local dllexport void @"?virtualInlineDecl@Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
186 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this)
187 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this)
188 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this)
189 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this)
190 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this)
191 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this)
192 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this)
193 // G64-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this)
194 __declspec(dllexport
) virtual void virtualDef();
195 __declspec(dllexport
) virtual void virtualInclass() {}
196 __declspec(dllexport
) virtual void virtualInlineDef();
197 __declspec(dllexport
) virtual inline void virtualInlineDecl();
199 // MSC-DAG: define dso_local dllexport void @"?staticDef@Nested@ExportMembers@@SAXXZ"()
200 // MSC-DAG: define weak_odr dso_local dllexport void @"?staticInclass@Nested@ExportMembers@@SAXXZ"()
201 // MSC-DAG: define weak_odr dso_local dllexport void @"?staticInlineDef@Nested@ExportMembers@@SAXXZ"()
202 // MSC-DAG: define weak_odr dso_local dllexport void @"?staticInlineDecl@Nested@ExportMembers@@SAXXZ"()
203 // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested9staticDefEv()
204 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested13staticInclassEv()
205 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested15staticInlineDefEv()
206 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN13ExportMembers6Nested16staticInlineDeclEv()
207 __declspec(dllexport
) static void staticDef();
208 __declspec(dllexport
) static void staticInclass() {}
209 __declspec(dllexport
) static void staticInlineDef();
210 __declspec(dllexport
) static inline void staticInlineDecl();
212 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?protectedDef@Nested@ExportMembers@@IAEXXZ"(ptr {{[^,]*}} %this)
213 // M64-DAG: define dso_local dllexport void @"?protectedDef@Nested@ExportMembers@@IEAAXXZ"(ptr {{[^,]*}} %this)
214 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this)
215 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this)
216 // MSC-DAG: define dso_local dllexport void @"?protectedStaticDef@Nested@ExportMembers@@KAXXZ"()
217 // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested18protectedStaticDefEv()
219 __declspec(dllexport
) void protectedDef();
220 __declspec(dllexport
) static void protectedStaticDef();
222 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?privateDef@Nested@ExportMembers@@AAEXXZ"(ptr {{[^,]*}} %this)
223 // M64-DAG: define dso_local dllexport void @"?privateDef@Nested@ExportMembers@@AEAAXXZ"(ptr {{[^,]*}} %this)
224 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this)
225 // G64-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this)
226 // MSC-DAG: define dso_local dllexport void @"?privateStaticDef@Nested@ExportMembers@@CAXXZ"()
227 // GNU-DAG: define dso_local dllexport void @_ZN13ExportMembers6Nested16privateStaticDefEv()
229 __declspec(dllexport
) void privateDef();
230 __declspec(dllexport
) static void privateStaticDef();
232 // M32-DAG: define dso_local x86_thiscallcc void @"?ignored@Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
233 // M64-DAG: define dso_local void @"?ignored@Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
234 // G32-DAG: define dso_local x86_thiscallcc void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this)
235 // G64-DAG: define dso_local void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this)
239 // MSC-DAG: @"?StaticField@Nested@ExportMembers@@2HA" = dso_local dllexport global i32 1, align 4
240 // MSC-DAG: @"?StaticConstField@Nested@ExportMembers@@2HB" = dso_local dllexport constant i32 1, align 4
241 // MSC-DAG: @"?StaticConstFieldEqualInit@Nested@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
242 // MSC-DAG: @"?StaticConstFieldBraceInit@Nested@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
243 // MSC-DAG: @"?StaticConstFieldRefNotDef@Nested@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
244 // MSC-DAG: @"?ConstexprField@Nested@ExportMembers@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
245 // GNU-DAG: @_ZN13ExportMembers6Nested11StaticFieldE = dso_local dllexport global i32 1, align 4
246 // GNU-DAG: @_ZN13ExportMembers6Nested16StaticConstFieldE = dso_local dllexport constant i32 1, align 4
247 // GNU-DAG: @_ZN13ExportMembers6Nested25StaticConstFieldEqualInitE = dso_local dllexport constant i32 1, align 4
248 // GNU-DAG: @_ZN13ExportMembers6Nested25StaticConstFieldBraceInitE = dso_local dllexport constant i32 1, align 4
249 // GNU-DAG: @_ZN13ExportMembers6Nested14ConstexprFieldE = dso_local dllexport constant i32 1, align 4
250 __declspec(dllexport
) static int StaticField
;
251 __declspec(dllexport
) static const int StaticConstField
;
252 __declspec(dllexport
) static const int StaticConstFieldEqualInit
= 1;
253 __declspec(dllexport
) static const int StaticConstFieldBraceInit
{1};
254 __declspec(dllexport
) static const int StaticConstFieldRefNotDef
= 1;
255 __declspec(dllexport
) constexpr static int ConstexprField
= 1;
258 void ExportMembers::Nested::normalDef() {}
259 inline void ExportMembers::Nested::normalInlineDef() {}
260 void ExportMembers::Nested::normalInlineDecl() {}
261 void ExportMembers::Nested::virtualDef() {}
262 inline void ExportMembers::Nested::virtualInlineDef() {}
263 void ExportMembers::Nested::virtualInlineDecl() {}
264 void ExportMembers::Nested::staticDef() {}
265 inline void ExportMembers::Nested::staticInlineDef() {}
266 void ExportMembers::Nested::staticInlineDecl() {}
267 void ExportMembers::Nested::ignored() {}
268 void ExportMembers::Nested::protectedDef() {}
269 void ExportMembers::Nested::protectedStaticDef() {}
270 void ExportMembers::Nested::privateDef() {}
271 void ExportMembers::Nested::privateStaticDef() {}
273 int ExportMembers::Nested::StaticField
= 1;
274 const int ExportMembers::Nested::StaticConstField
= 1;
275 const int ExportMembers::Nested::StaticConstFieldEqualInit
;
276 const int ExportMembers::Nested::StaticConstFieldBraceInit
;
277 int fooNested() { return ExportMembers::Nested::StaticConstFieldRefNotDef
; }
278 constexpr int ExportMembers::Nested::ConstexprField
;
281 // Export special member functions.
282 struct ExportSpecials
{
283 // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
284 // M64-DAG: define dso_local dllexport ptr @"??0ExportSpecials@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
285 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this)
286 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this)
287 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this)
288 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this)
289 __declspec(dllexport
) ExportSpecials();
291 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportSpecials@@QAE@XZ"(ptr {{[^,]*}} %this)
292 // M64-DAG: define dso_local dllexport void @"??1ExportSpecials@@QEAA@XZ"(ptr {{[^,]*}} %this)
293 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this)
294 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this)
295 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this)
296 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this)
297 __declspec(dllexport
) ~ExportSpecials();
299 // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
300 // M64-DAG: define dso_local dllexport ptr @"??0ExportSpecials@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
301 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
302 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
303 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
304 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
305 __declspec(dllexport
) ExportSpecials(const ExportSpecials
&);
307 // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
308 // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
309 // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
310 // G64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
311 __declspec(dllexport
) ExportSpecials
& operator=(const ExportSpecials
&);
313 // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
314 // M64-DAG: define dso_local dllexport ptr @"??0ExportSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
315 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
316 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
317 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
318 // G64-DAG: define dso_local dllexport void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
319 __declspec(dllexport
) ExportSpecials(ExportSpecials
&&);
321 // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
322 // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
323 // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
324 // G64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
325 __declspec(dllexport
) ExportSpecials
& operator=(ExportSpecials
&&);
327 ExportSpecials::ExportSpecials() {}
328 ExportSpecials::~ExportSpecials() {}
329 ExportSpecials::ExportSpecials(const ExportSpecials
&) {}
330 ExportSpecials
& ExportSpecials::operator=(const ExportSpecials
&) { return *this; }
331 ExportSpecials::ExportSpecials(ExportSpecials
&&) {}
332 ExportSpecials
& ExportSpecials::operator=(ExportSpecials
&&) { return *this; }
335 // Export class with inline special member functions.
336 struct ExportInlineSpecials
{
337 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
338 // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportInlineSpecials@@QEAA@XZ"(
339 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1Ev(
340 // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1Ev(
341 __declspec(dllexport
) ExportInlineSpecials() {}
343 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportInlineSpecials@@QAE@XZ"(
344 // M64-DAG: define weak_odr dso_local dllexport void @"??1ExportInlineSpecials@@QEAA@XZ"(
345 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsD1Ev(
346 // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsD1Ev(
347 __declspec(dllexport
) ~ExportInlineSpecials() {}
349 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@ABU0@@Z"(
350 // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportInlineSpecials@@QEAA@AEBU0@@Z"(
351 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1ERKS_(
352 // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1ERKS_(
353 __declspec(dllexport
) inline ExportInlineSpecials(const ExportInlineSpecials
&);
355 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QAEAAU0@ABU0@@Z"(
356 // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"(
357 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_(
358 // G64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_(
359 __declspec(dllexport
) ExportInlineSpecials
& operator=(const ExportInlineSpecials
&);
361 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@$$QAU0@@Z"(
362 // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportInlineSpecials@@QEAA@$$QEAU0@@Z"(
363 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1EOS_(
364 // G64-DAG: define weak_odr dso_local dllexport void @_ZN20ExportInlineSpecialsC1EOS_(
365 __declspec(dllexport
) ExportInlineSpecials(ExportInlineSpecials
&&) {}
367 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
368 // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
369 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_(
370 // G64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_(
371 __declspec(dllexport
) ExportInlineSpecials
& operator=(ExportInlineSpecials
&&) { return *this; }
373 ExportInlineSpecials::ExportInlineSpecials(const ExportInlineSpecials
&) {}
374 inline ExportInlineSpecials
& ExportInlineSpecials::operator=(const ExportInlineSpecials
&) { return *this; }
377 // Export defaulted member function definitions.
378 struct ExportDefaultedDefs
{
379 __declspec(dllexport
) ExportDefaultedDefs();
380 __declspec(dllexport
) ~ExportDefaultedDefs();
381 __declspec(dllexport
) inline ExportDefaultedDefs(const ExportDefaultedDefs
&);
382 __declspec(dllexport
) ExportDefaultedDefs
& operator=(const ExportDefaultedDefs
&);
383 __declspec(dllexport
) ExportDefaultedDefs(ExportDefaultedDefs
&&);
384 __declspec(dllexport
) ExportDefaultedDefs
& operator=(ExportDefaultedDefs
&&);
387 // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
388 // M64-DAG: define dso_local dllexport ptr @"??0ExportDefaultedDefs@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
389 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this)
390 // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this)
391 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this)
392 // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this)
393 __declspec(dllexport
) ExportDefaultedDefs::ExportDefaultedDefs() = default;
395 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedDefs@@QAE@XZ"(ptr {{[^,]*}} %this)
396 // M64-DAG: define dso_local dllexport void @"??1ExportDefaultedDefs@@QEAA@XZ"(ptr {{[^,]*}} %this)
397 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this)
398 // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this)
399 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this)
400 // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this)
401 ExportDefaultedDefs::~ExportDefaultedDefs() = default;
403 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
404 // M64-DAG: define weak_odr dso_local dllexport ptr @"??0ExportDefaultedDefs@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
405 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
406 // G64-DAG: define weak_odr dso_local dllexport void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
407 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
408 // G64-DAG: define weak_odr dso_local dllexport void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
409 __declspec(dllexport
) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs
&) = default;
411 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
412 // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
413 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
414 // G64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
415 inline ExportDefaultedDefs
& ExportDefaultedDefs::operator=(const ExportDefaultedDefs
&) = default;
417 // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
418 // M64-DAG: define dso_local dllexport ptr @"??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
419 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
420 // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
421 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
422 // G64-DAG: define dso_local dllexport void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
423 __declspec(dllexport
) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs
&&) = default;
425 // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
426 // M64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
427 // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
428 // G64-DAG: define dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
429 ExportDefaultedDefs
& ExportDefaultedDefs::operator=(ExportDefaultedDefs
&&) = default;
432 // Export defaulted member function definitions declared inside class.
433 struct ExportDefaultedInclassDefs
{
434 __declspec(dllexport
) ExportDefaultedInclassDefs() = default;
435 // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
436 // M64VS2013-DAG: define weak_odr dso_local dllexport ptr @"??0ExportDefaultedInclassDefs@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
437 // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
438 // M64VS2015-NOT: define weak_odr dso_local dllexport ptr @"??0ExportDefaultedInclassDefs@@QEAA@XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
440 __declspec(dllexport
) ~ExportDefaultedInclassDefs() = default;
441 // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE@XZ"(ptr %this)
442 // M64VS2013-DAG: define weak_odr dso_local dllexport void @"??1ExportDefaultedInclassDefs@@QEAA@XZ"(ptr %this)
443 // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE@XZ"(ptr %this)
444 // M64VS2015-NOT: define weak_odr dso_local dllexport void @"??1ExportDefaultedInclassDefs@@QEAA@XZ"(ptr %this)
446 __declspec(dllexport
) ExportDefaultedInclassDefs(const ExportDefaultedInclassDefs
&) = default;
447 // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
448 // M64VS2013-DAG: define weak_odr dso_local dllexport ptr @"??0ExportDefaultedInclassDefs@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
449 // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE@ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
450 // M64VS2015-NOT: define weak_odr dso_local dllexport ptr @"??0ExportDefaultedInclassDefs@@QEAA@AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
452 __declspec(dllexport
) ExportDefaultedInclassDefs
& operator=(const ExportDefaultedInclassDefs
&) = default;
453 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedInclassDefs@@QAEAAU0@ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
454 // M64-DAG: define weak_odr dso_local dllexport nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedInclassDefs@@QEAAAEAU0@AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
458 // Export allocation functions.
460 __declspec(dllexport
) void* operator new(__SIZE_TYPE__
);
461 __declspec(dllexport
) void* operator new[](__SIZE_TYPE__
);
462 __declspec(dllexport
) void operator delete(void*);
463 __declspec(dllexport
) void operator delete[](void*);
466 // M32-DAG: define dso_local dllexport ptr @"??2ExportAlloc@@SAPAXI@Z"(i32 %n)
467 // M64-DAG: define dso_local dllexport ptr @"??2ExportAlloc@@SAPEAX_K@Z"(i64 %n)
468 // G32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEj(i32 %n)
469 // G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEy(i64 %n)
470 void* ExportAlloc::operator new(__SIZE_TYPE__ n
) { return malloc(n
); }
472 // M32-DAG: define dso_local dllexport ptr @"??_UExportAlloc@@SAPAXI@Z"(i32 %n)
473 // M64-DAG: define dso_local dllexport ptr @"??_UExportAlloc@@SAPEAX_K@Z"(i64 %n)
474 // G32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEj(i32 %n)
475 // G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEy(i64 %n)
476 void* ExportAlloc::operator new[](__SIZE_TYPE__ n
) { return malloc(n
); }
478 // M32-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPAX@Z"(ptr %p)
479 // M64-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPEAX@Z"(ptr %p)
480 // G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p)
481 // G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p)
482 void ExportAlloc::operator delete(void* p
) { free(p
); }
484 // M32-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPAX@Z"(ptr %p)
485 // M64-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPEAX@Z"(ptr %p)
486 // G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p)
487 // G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p)
488 void ExportAlloc::operator delete[](void* p
) { free(p
); }
491 //===----------------------------------------------------------------------===//
492 // Class member templates
493 //===----------------------------------------------------------------------===//
496 template<typename T
> void normalDef() {}
497 template<typename T
> __declspec(dllexport
) void exportedNormal() {}
498 template<typename T
> static void staticDef() {}
499 template<typename T
> __declspec(dllexport
) static void exportedStatic() {}
502 // Export implicit instantiation of an exported member function template.
503 void useMemFunTmpl() {
504 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
505 // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
506 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
507 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
508 MemFunTmpl().exportedNormal
<ImplicitInst_Exported
>();
510 // MSC-DAG: define weak_odr dso_local dllexport void @"??$exportedStatic@UImplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
511 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedStaticI21ImplicitInst_ExportedEEvv()
512 MemFunTmpl().exportedStatic
<ImplicitInst_Exported
>();
516 // Export explicit instantiation declaration of an exported member function
518 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
519 // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
520 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
521 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
522 extern template void MemFunTmpl::exportedNormal
<ExplicitDecl_Exported
>();
523 template void MemFunTmpl::exportedNormal
<ExplicitDecl_Exported
>();
525 // MSC-DAG: define weak_odr dso_local dllexport void @"??$exportedStatic@UExplicitDecl_Exported@@@MemFunTmpl@@SAXXZ"()
526 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedStaticI21ExplicitDecl_ExportedEEvv()
527 extern template void MemFunTmpl::exportedStatic
<ExplicitDecl_Exported
>();
528 template void MemFunTmpl::exportedStatic
<ExplicitDecl_Exported
>();
531 // Export explicit instantiation definition of an exported member function
533 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
534 // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
535 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
536 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
537 template void MemFunTmpl::exportedNormal
<ExplicitInst_Exported
>();
539 // MSC-DAG: define weak_odr dso_local dllexport void @"??$exportedStatic@UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
540 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedStaticI21ExplicitInst_ExportedEEvv()
541 template void MemFunTmpl::exportedStatic
<ExplicitInst_Exported
>();
544 // Export specialization of an exported member function template.
545 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
546 // M64-DAG: define dso_local dllexport void @"??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
547 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
548 // G64-DAG: define dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
549 template<> __declspec(dllexport
) void MemFunTmpl::exportedNormal
<ExplicitSpec_Def_Exported
>() {}
551 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
552 // M64-DAG: define weak_odr dso_local dllexport void @"??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
553 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
554 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
555 template<> __declspec(dllexport
) inline void MemFunTmpl::exportedNormal
<ExplicitSpec_InlineDef_Exported
>() {}
557 // MSC-DAG: define dso_local dllexport void @"??$exportedStatic@UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
558 // GNU-DAG: define dso_local dllexport void @_ZN10MemFunTmpl14exportedStaticI25ExplicitSpec_Def_ExportedEEvv()
559 template<> __declspec(dllexport
) void MemFunTmpl::exportedStatic
<ExplicitSpec_Def_Exported
>() {}
561 // MSC-DAG: define weak_odr dso_local dllexport void @"??$exportedStatic@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@SAXXZ"()
562 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl14exportedStaticI31ExplicitSpec_InlineDef_ExportedEEvv()
563 template<> __declspec(dllexport
) inline void MemFunTmpl::exportedStatic
<ExplicitSpec_InlineDef_Exported
>() {}
566 // Not exporting specialization of an exported member function template without
567 // explicit dso_local dllexport.
568 // M32-DAG: define dso_local x86_thiscallcc void @"??$exportedNormal@UExplicitSpec_NotExported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
569 // M64-DAG: define dso_local void @"??$exportedNormal@UExplicitSpec_NotExported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
570 // G32-DAG: define dso_local x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(ptr {{[^,]*}} %this)
571 // G64-DAG: define dso_local void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(ptr {{[^,]*}} %this)
572 template<> void MemFunTmpl::exportedNormal
<ExplicitSpec_NotExported
>() {}
574 // M32-DAG: define dso_local void @"??$exportedStatic@UExplicitSpec_NotExported@@@MemFunTmpl@@SAXXZ"()
575 // GNU-DAG: define dso_local void @_ZN10MemFunTmpl14exportedStaticI24ExplicitSpec_NotExportedEEvv()
576 template<> void MemFunTmpl::exportedStatic
<ExplicitSpec_NotExported
>() {}
579 // Export explicit instantiation declaration of a non-exported member function
581 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
582 // M64-DAG: define weak_odr dso_local dllexport void @"??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
583 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
584 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
585 extern template __declspec(dllexport
) void MemFunTmpl::normalDef
<ExplicitDecl_Exported
>();
586 template __declspec(dllexport
) void MemFunTmpl::normalDef
<ExplicitDecl_Exported
>();
588 // M32-DAG: define weak_odr dso_local dllexport void @"??$staticDef@UExplicitDecl_Exported@@@MemFunTmpl@@SAXXZ"()
589 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9staticDefI21ExplicitDecl_ExportedEEvv()
590 extern template __declspec(dllexport
) void MemFunTmpl::staticDef
<ExplicitDecl_Exported
>();
591 template __declspec(dllexport
) void MemFunTmpl::staticDef
<ExplicitDecl_Exported
>();
594 // Export explicit instantiation definition of a non-exported member function
596 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
597 // M64-DAG: define weak_odr dso_local dllexport void @"??$normalDef@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
598 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
599 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
600 template __declspec(dllexport
) void MemFunTmpl::normalDef
<ExplicitInst_Exported
>();
602 // MSC-DAG: define weak_odr dso_local dllexport void @"??$staticDef@UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
603 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9staticDefI21ExplicitInst_ExportedEEvv()
604 template __declspec(dllexport
) void MemFunTmpl::staticDef
<ExplicitInst_Exported
>();
607 // Export specialization of a non-exported member function template.
608 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??$normalDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
609 // M64-DAG: define dso_local dllexport void @"??$normalDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
610 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
611 // M64-DAG: define weak_odr dso_local dllexport void @"??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
612 // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
613 // G64-DAG: define dso_local dllexport void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
614 // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
615 // G64-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
616 template<> __declspec(dllexport
) void MemFunTmpl::normalDef
<ExplicitSpec_Def_Exported
>() {}
617 template<> __declspec(dllexport
) inline void MemFunTmpl::normalDef
<ExplicitSpec_InlineDef_Exported
>() {}
619 // MSC-DAG: define dso_local dllexport void @"??$staticDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
620 // MSC-DAG: define weak_odr dso_local dllexport void @"??$staticDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@SAXXZ"()
621 // GNU-DAG: define dso_local dllexport void @_ZN10MemFunTmpl9staticDefI25ExplicitSpec_Def_ExportedEEvv()
622 // GNU-DAG: define weak_odr dso_local dllexport void @_ZN10MemFunTmpl9staticDefI31ExplicitSpec_InlineDef_ExportedEEvv()
623 template<> __declspec(dllexport
) void MemFunTmpl::staticDef
<ExplicitSpec_Def_Exported
>() {}
624 template<> __declspec(dllexport
) inline void MemFunTmpl::staticDef
<ExplicitSpec_InlineDef_Exported
>() {}
629 template<typename T
> static const int StaticVar
= 1;
630 template<typename T
> __declspec(dllexport
) static const int ExportedStaticVar
= 1;
632 template<typename T
> const int MemVarTmpl::StaticVar
;
633 template<typename T
> const int MemVarTmpl::ExportedStaticVar
;
635 // Export implicit instantiation of an exported member variable template.
636 // MSC-DAG: @"??$ExportedStaticVar@UImplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
637 // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ImplicitInst_ExportedEE = weak_odr dso_local dllexport constant i32 1, comdat, align 4
638 int useMemVarTmpl() { return MemVarTmpl::ExportedStaticVar
<ImplicitInst_Exported
>; }
640 // Export explicit instantiation declaration of an exported member variable
642 // MSC-DAG: @"??$ExportedStaticVar@UExplicitDecl_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
643 // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ExplicitDecl_ExportedEE = weak_odr dso_local dllexport constant i32 1, comdat, align 4
644 extern template const int MemVarTmpl::ExportedStaticVar
<ExplicitDecl_Exported
>;
645 template const int MemVarTmpl::ExportedStaticVar
<ExplicitDecl_Exported
>;
647 // Export explicit instantiation definition of an exported member variable
649 // MSC-DAG: @"??$ExportedStaticVar@UExplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
650 // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ExplicitInst_ExportedEE = weak_odr dso_local dllexport constant i32 1, comdat, align 4
651 template const int MemVarTmpl::ExportedStaticVar
<ExplicitInst_Exported
>;
653 // Export specialization of an exported member variable template.
654 // MSC-DAG: @"??$ExportedStaticVar@UExplicitSpec_Def_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
655 // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI25ExplicitSpec_Def_ExportedEE = dso_local dllexport constant i32 1, align 4
656 template<> __declspec(dllexport
) const int MemVarTmpl::ExportedStaticVar
<ExplicitSpec_Def_Exported
> = 1;
658 // Not exporting specialization of an exported member variable template without
659 // explicit dllexport.
660 // MSC-DAG: @"??$ExportedStaticVar@UExplicitSpec_NotExported@@@MemVarTmpl@@2HB" = weak_odr dso_local constant i32 1, comdat, align 4
661 // GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI24ExplicitSpec_NotExportedEE = dso_local constant i32 1, align 4
662 template<> const int MemVarTmpl::ExportedStaticVar
<ExplicitSpec_NotExported
> = 1;
665 // Export explicit instantiation declaration of a non-exported member variable
667 // MSC-DAG: @"??$StaticVar@UExplicitDecl_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
668 // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitDecl_ExportedEE = weak_odr dso_local dllexport constant i32 1, comdat, align 4
669 extern template __declspec(dllexport
) const int MemVarTmpl::StaticVar
<ExplicitDecl_Exported
>;
670 template __declspec(dllexport
) const int MemVarTmpl::StaticVar
<ExplicitDecl_Exported
>;
672 // Export explicit instantiation definition of a non-exported member variable
674 // MSC-DAG: @"??$StaticVar@UExplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
675 // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitInst_ExportedEE = weak_odr dso_local dllexport constant i32 1, comdat, align 4
676 template __declspec(dllexport
) const int MemVarTmpl::StaticVar
<ExplicitInst_Exported
>;
678 // Export specialization of a non-exported member variable template.
679 // MSC-DAG: @"??$StaticVar@UExplicitSpec_Def_Exported@@@MemVarTmpl@@2HB" = weak_odr dso_local dllexport constant i32 1, comdat, align 4
680 // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI25ExplicitSpec_Def_ExportedEE = dso_local dllexport constant i32 1, align 4
681 template<> __declspec(dllexport
) const int MemVarTmpl::StaticVar
<ExplicitSpec_Def_Exported
> = 1;
684 //===----------------------------------------------------------------------===//
685 // Class template members
686 //===----------------------------------------------------------------------===//
688 template <typename
> struct ClassTmplMem
{
689 void __declspec(dllexport
) exportedNormal();
690 static void __declspec(dllexport
) exportedStatic();
692 // MSVC exports explicit specialization of exported class template member function; MinGW does not.
693 // M32-DAG: define dso_local dllexport x86_thiscallcc void @"?exportedNormal@?$ClassTmplMem@H@@QAEXXZ"
694 // G32-DAG: define dso_local x86_thiscallcc void @_ZN12ClassTmplMemIiE14exportedNormalEv
695 template<> void ClassTmplMem
<int>::exportedNormal() {}
697 // M32-DAG: define dso_local dllexport void @"?exportedStatic@?$ClassTmplMem@H@@SAXXZ"
698 // G32-DAG: define dso_local void @_ZN12ClassTmplMemIiE14exportedStaticEv
699 template<> void ClassTmplMem
<int>::exportedStatic() {}