Home | History | Annotate | Download | only in CodeGenCXX

Lines Matching full:dllimport

39 // MSC-DAG: @"\01?ExternGlobalDecl@@3HA" = external dllimport global i32
40 // GNU-DAG: @ExternGlobalDecl = external dllimport global i32
41 __declspec(dllimport) extern int ExternGlobalDecl;
44 // dllimport implies a declaration.
45 // MSC-DAG: @"\01?GlobalDecl@@3HA" = external dllimport global i32
46 // GNU-DAG: @GlobalDecl = external dllimport global i32
47 __declspec(dllimport) int GlobalDecl;
51 // MSC-DAG: @"\01?GlobalRedecl1@@3HA" = external dllimport global i32
52 // GNU-DAG: @GlobalRedecl1 = external dllimport global i32
53 __declspec(dllimport) extern int GlobalRedecl1;
54 __declspec(dllimport) extern int GlobalRedecl1;
57 // MSC-DAG: @"\01?GlobalRedecl2a@@3HA" = external dllimport global i32
58 // GNU-DAG: @GlobalRedecl2a = external dllimport global i32
59 __declspec(dllimport) int GlobalRedecl2a;
60 __declspec(dllimport) int GlobalRedecl2a;
63 // M32-DAG: @"\01?GlobalRedecl2b@@3PAHA" = external dllimport global i32*
64 // M64-DAG: @"\01?GlobalRedecl2b@@3PEAHEA" = external dllimport global i32*
65 // GNU-DAG: @GlobalRedecl2b = external dllimport global i32*
66 int *__attribute__((dllimport)) GlobalRedecl2b;
67 int *__attribute__((dllimport)) GlobalRedecl2b;
70 // MSC-DAG: @"\01?GlobalRedecl2c@@3HA" = external dllimport global i32
71 // GNU-DAG: @GlobalRedecl2c = external dllimport global i32
72 int GlobalRedecl2c __attribute__((dllimport));
73 int GlobalRedecl2c __attribute__((dllimport));
77 // and drop the dllimport with a warning.
80 __declspec(dllimport) extern int GlobalRedecl3;
81 extern int GlobalRedecl3; // dllimport ignored
84 // MSC-DAG: @"\01?ExternalGlobal@ns@@3HA" = external dllimport global i32
85 // GNU-DAG: @_ZN2ns14ExternalGlobalE = external dllimport global i32
86 namespace ns { __declspec(dllimport) int ExternalGlobal; }
89 int __declspec(dllimport) f();
90 // MO1-DAG: @"\01?x@?1??inlineStaticLocalsFunc@@YAHXZ@4HA" = available_externally dllimport global i32 0
91 // MO1-DAG: @"\01??_B?1??inlineStaticLocalsFunc@@YAHXZ@51" = available_externally dllimport global i32 0
92 inline int __declspec(dllimport) inlineStaticLocalsFunc() {
98 // The address of a dllimport global cannot be used in constant initialization.
113 // MSC-DAG: @"\01??$ExternVarTmplDecl@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
114 // GNU-DAG: @_Z17ExternVarTmplDeclI21ImplicitInst_ImportedE = external dllimport global i32
115 template<typename T> __declspec(dllimport) extern int ExternVarTmplDecl;
118 // dllimport implies a declaration.
119 // MSC-DAG: @"\01??$VarTmplDecl@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
120 // GNU-DAG: @_Z11VarTmplDeclI21ImplicitInst_ImportedE = external dllimport global i32
121 template<typename T> __declspec(dllimport) int VarTmplDecl;
125 // MSC-DAG: @"\01??$VarTmplRedecl1@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
126 // GNU-DAG: @_Z14VarTmplRedecl1I21ImplicitInst_ImportedE = external dllimport global i32
127 template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
128 template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
131 // MSC-DAG: @"\01??$VarTmplRedecl2@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
132 // GNU-DAG: @_Z14VarTmplRedecl2I21ImplicitInst_ImportedE = external dllimport global i32
133 template<typename T> __declspec(dllimport) int VarTmplRedecl2;
134 template<typename T> __declspec(dllimport) int VarTmplRedecl2;
139 template<typename T> __declspec(dllimport) extern int VarTmplRedecl3;
140 template<typename T> extern int VarTmplRedecl3; // dllimport ignored
144 // MSC-DAG: @"\01??$ExternalVarTmpl@UImplicitInst_Imported@@@ns@@3HA" = external dllimport global i32
145 // GNU-DAG: @_ZN2ns15ExternalVarTmplI21ImplicitInst_ImportedEE = external dllimport global i32
146 namespace ns { template<typename T> __declspec(dllimport) int ExternalVarTmpl; }
151 template<typename T> __declspec(dllimport) int ImportedVarTmpl;
154 // MSC-DAG: @"\01??$ImportedVarTmpl@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
155 // GNU-DAG: @_Z15ImportedVarTmplI21ImplicitInst_ImportedE = external dllimport global i32
159 // MSC-DAG: @"\01??$ImportedVarTmpl@UExplicitDecl_Imported@@@@3HA" = external dllimport global i32
160 // GNU-DAG: @_Z15ImportedVarTmplI21ExplicitDecl_ImportedE = external dllimport global i32
168 // MSC-DAG: @"\01??$ImportedVarTmpl@UExplicitSpec_Imported@@@@3HA" = external dllimport global i32
169 // GNU-DAG: @_Z15ImportedVarTmplI21ExplicitSpec_ImportedE = external dllimport global i32
170 template<> __declspec(dllimport) int ImportedVarTmpl<ExplicitSpec_Imported>;
174 // explicit dllimport.
181 // MSC-DAG: @"\01??$VarTmpl@UExplicitDecl_Imported@@@@3HA" = external dllimport global i32
182 // GNU-DAG: @_Z7VarTmplI21ExplicitDecl_ImportedE = external dllimport global i32
183 extern template __declspec(dllimport) int VarTmpl<ExplicitDecl_Imported>;
187 // MSC-DAG: @"\01??$VarTmpl@UExplicitInst_Imported@@@@3HA" = external dllimport global i32
188 // GNU-DAG: @_Z7VarTmplI21ExplicitInst_ImportedE = external dllimport global i32
189 template __declspec(dllimport) int VarTmpl<ExplicitInst_Imported>;
193 // MSC-DAG: @"\01??$VarTmpl@UExplicitSpec_Imported@@@@3HA" = external dllimport global i32
194 // GNU-DAG: @_Z7VarTmplI21ExplicitSpec_ImportedE = external dllimport global i32
195 template<> __declspec(dllimport) int VarTmpl<ExplicitSpec_Imported>;
205 // MSC-DAG: declare dllimport void @"\01?decl@@YAXXZ"()
206 // GNU-DAG: declare dllimport void @_Z4declv()
207 __declspec(dllimport) void decl();
211 // MSC-DAG: declare dllimport void @externC()
212 // GNU-DAG: declare dllimport void @externC()
213 extern "C" __declspec(dllimport) void externC();
217 // MSC-DAG: declare dllimport void @"\01?inlineFunc@@YAXXZ"()
219 // MO1-DAG: define available_externally dllimport void @"\01?inlineFunc@@YAXXZ"()
221 __declspec(dllimport) inline void inlineFunc() {}
224 // MSC-DAG: declare dllimport void @"\01?inlineDecl@@YAXXZ"()
226 // MO1-DAG: define available_externally dllimport void @"\01?inlineDecl@@YAXXZ"()
228 __declspec(dllimport) inline void inlineDecl();
232 // MSC-DAG: declare dllimport void @"\01?inlineDef@@YAXXZ"()
234 // MO1-DAG: define available_externally dllimport void @"\01?inlineDef@@YAXXZ"()
236 __declspec(dllimport) void inlineDef();
241 // MSC-DAG: declare dllimport void @"\01?noinline@@YAXXZ"()
243 __declspec(dllimport) __attribute__((noinline)) inline void noinline() {}
248 __declspec(dllimport) __attribute__((always_inline)) inline void alwaysInline() {}
252 // MSC-DAG: declare dllimport void @"\01?redecl1@@YAXXZ"()
253 // GNU-DAG: declare dllimport void @_Z7redecl1v()
254 __declspec(dllimport) void redecl1();
255 __declspec(dllimport) void redecl1();
259 // and drop the dllimport with a warning.
262 __declspec(dllimport) void redecl2();
268 __declspec(dllimport) void redecl3();
269 void redecl3() {} // dllimport ignored
274 // MSC-DAG: declare dllimport void @"\01?friend1@@YAXXZ"()
275 // GNU-DAG: declare dllimport void @_Z7friend1v()
282 // MSC-DAG: declare dllimport void @"\01?friend5@@YAXXZ"()
283 // GNU-DAG: declare dllimport void @_Z7friend5v()
286 friend __declspec(dllimport) void friend1();
287 friend __declspec(dllimport) void friend2();
288 friend __declspec(dllimport) void friend3();
290 __declspec(dllimport) void friend1();
291 void friend2(); // dllimport ignored
292 void friend3() {} // dllimport ignored
294 __declspec(dllimport) void friend4();
295 __declspec(dllimport) void friend5();
297 friend void friend4(); // dllimport ignored
306 // Implicit declarations can be redeclared with dllimport.
307 // MSC-DAG: declare dllimport noalias i8* @"\01??2@{{YAPAXI|YAPEAX_K}}@Z"(
308 // GNU-DAG: declare dllimport noalias i8* @_Znw{{[yj]}}(
309 __declspec(dllimport) void* operator new(__SIZE_TYPE__ n);
312 // MSC-DAG: declare dllimport void @"\01?externalFunc@ns@@YAXXZ"()
313 // GNU-DAG: declare dllimport void @_ZN2ns12externalFuncEv()
314 namespace ns { __declspec(dllimport) void externalFunc(); }
317 // A dllimport function referencing non-imported vars or functions must not be available_externally.
318 __declspec(dllimport) int ImportedVar;
320 __declspec(dllimport) int ImportedFunc();
322 __declspec(dllimport) inline int ReferencingImportedVar() { return ImportedVar; }
323 // MO1-DAG: define available_externally dllimport i32 @"\01?ReferencingImportedVar@@YAHXZ"
324 __declspec(dllimport) inline int ReferencingNonImportedVar() { return NonImportedVar; }
325 // MO1-DAG: declare dllimport i32 @"\01?ReferencingNonImportedVar@@YAHXZ"()
326 __declspec(dllimport) inline int ReferencingImportedFunc() { return ImportedFunc(); }
327 // MO1-DAG: define available_externally dllimport i32 @"\01?ReferencingImportedFunc@@YAHXZ"
328 __declspec(dllimport) inline int ReferencingNonImportedFunc() { return NonImportedFunc(); }
329 // MO1-DAG: declare dllimport
335 __declspec(dllimport) inline int *ReferencingNonImportedNew() { return new int[2]; }
336 // MO1-DAG: declare dllimport i32* @"\01?ReferencingNonImportedNew@@YAPAHXZ"
337 __declspec(dllimport) inline int *ReferencingNonImportedDelete() { delete (int*)nullptr; }
338 // MO1-DAG: declare dllimport i32* @"\01?ReferencingNonImportedDelete@@YAPAHXZ"
341 __declspec(dllimport) void* operator new[](__SIZE_TYPE__);
342 __declspec(dllimport) void operator delete(void*);
343 __declspec(dllimport) inline int *ReferencingImportedNew() { return new int[2]; }
344 // MO1-DAG: define available_externally dllimport i32* @"\01?ReferencingImportedNew@@YAPAHXZ"
345 __declspec(dllimport) inline int *ReferencingImportedDelete() { delete (int*)nullptr; }
346 // MO1-DAG: define available_externally dllimport i32* @"\01?ReferencingImportedDelete@@YAPAHXZ"
350 // A dllimport function with a TLS variable must not be available_externally.
351 __declspec(dllimport) inline void FunctionWithTLSVar() { static __thread int x = 42; }
352 // MO1-DAG: declare dllimport void @"\01?FunctionWithTLSVar@@YAXXZ"
353 __declspec(dllimport) inline void FunctionWithNormalVar() { static int x = 42; }
354 // MO1-DAG: define available_externally dllimport void @"\01?FunctionWithNormalVar@@YAXXZ"
364 // MSC-DAG: declare dllimport void @"\01??$funcTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
365 // GNU-DAG: declare dllimport void @_Z12funcTmplDeclI21ImplicitInst_ImportedEvv()
366 template<typename T> __declspec(dllimport) void funcTmplDecl();
372 // MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl1@UImplicitInst_Imported@@@@YAXXZ"()
374 // MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl1@UImplicitInst_Imported@@@@YAXXZ"()
376 template<typename T> __declspec(dllimport) inline void inlineFuncTmpl1() {}
379 // MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl2@UImplicitInst_Imported@@@@YAXXZ"()
381 // MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl2@UImplicitInst_Imported@@@@YAXXZ"()
383 template<typename T> inline void __attribute__((dllimport)) inlineFuncTmpl2() {}
386 // MSC-DAG: declare dllimport void @"\01??$inlineFuncTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
388 // MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
390 template<typename T> __declspec(dllimport) inline void inlineFuncTmplDecl();
394 // MSC-DAG: declare dllimport void @"\01??$inlineFuncTmplDef@UImplicitInst_Imported@@@@YAXXZ"()
396 // MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmplDef@UImplicitInst_Imported@@@@YAXXZ"()
398 template<typename T> __declspec(dllimport) void inlineFuncTmplDef();
404 // MSC-DAG: declare dllimport void @"\01??$funcTmplRedecl1@UImplicitInst_Imported@@@@YAXXZ"()
405 // GNU-DAG: declare dllimport void @_Z15funcTmplRedecl1I21ImplicitInst_ImportedEvv()
406 template<typename T> __declspec(dllimport) void funcTmplRedecl1();
407 template<typename T> __declspec(dllimport) void funcTmplRedecl1();
412 template<typename T> __declspec(dllimport) void funcTmplRedecl2();
413 template<typename T> void funcTmplRedecl2(); // dllimport ignored
418 template<typename T> __declspec(dllimport) void funcTmplRedecl3();
419 template<typename T> void funcTmplRedecl3() {} // dllimport ignored
424 // MSC-DAG: declare dllimport void @"\01??$funcTmplFriend1@UImplicitInst_Imported@@@@YAXXZ"()
425 // GNU-DAG: declare dllimport void @_Z15funcTmplFriend1I21ImplicitInst_ImportedEvv()
430 // MSC-DAG: declare dllimport void @"\01??$funcTmplFriend4@UImplicitInst_Imported@@@@YAXXZ"()
433 template<typename T> friend __declspec(dllimport) void funcTmplFriend1();
434 template<typename T> friend __declspec(dllimport) void funcTmplFriend2();
435 template<typename T> friend __declspec(dllimport) void funcTmplFriend3();
436 template<typename T> friend __declspec(dllimport) inline void funcTmplFriend4();
438 template<typename T> __declspec(dllimport) void funcTmplFriend1();
439 template<typename T> void funcTmplFriend2(); // dllimport ignored
440 template<typename T> void funcTmplFriend3() {} // dllimport ignored
447 // MSC-DAG: declare dllimport void @"\01??$externalFuncTmpl@UImplicitInst_Imported@@@ns@@YAXXZ"()
448 // GNU-DAG: declare dllimport void @_ZN2ns16externalFuncTmplI21ImplicitInst_ImportedEEvv()
449 namespace ns { template<typename T> __declspec(dllimport) void externalFuncTmpl(); }
455 template<typename T> __declspec(dllimport) void importedFuncTmplDecl();
456 template<typename T> __declspec(dllimport) inline void importedFuncTmpl() {}
459 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
460 // GNU-DAG: declare dllimport void @_Z20importedFuncTmplDeclI21ImplicitInst_ImportedEvv()
463 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UImplicitInst_Imported@@@@YAXXZ"()
465 // MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UImplicitInst_Imported@@@@YAXXZ"()
470 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
472 // MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
478 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
480 // MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
487 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_Imported@@@@YAXXZ"()
488 // GNU-DAG: declare dllimport void @_Z20importedFuncTmplDeclI21ExplicitSpec_ImportedEvv()
489 template<> __declspec(dllimport) void importedFuncTmplDecl<ExplicitSpec_Imported>();
492 // MSC-DAG-FIXME: declare dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
493 // MO1-DAG-FIXME: define available_externally dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
495 //template<> __declspec(dllimport) void importedFuncTmplDecl<ExplicitSpec_Def_Imported>() {}
499 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
501 // MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
503 template<> __declspec(dllimport) inline void importedFuncTmplDecl<ExplicitSpec_InlineDef_Imported>() {}
507 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_Imported@@@@YAXXZ"()
508 // GNU-DAG: declare dllimport void @_Z16importedFuncTmplI21ExplicitSpec_ImportedEvv()
509 template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Imported>();
512 // MSC-DAG-FIXME: declare dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
513 // MO1-DAG-FIXME: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
515 //template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Def_Imported>() {}
519 // MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
521 // MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
523 template<> __declspec(dllimport) inline void importedFuncTmpl<ExplicitSpec_InlineDef_Imported>() {}
528 // explicit dllimport.
536 // MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
537 // MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
538 // GNU-DAG: declare dllimport void @_Z8funcTmplI21ExplicitDecl_ImportedEvv()
540 // MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
542 extern template __declspec(dllimport) void funcTmpl<ExplicitDecl_Imported>();
543 extern template __declspec(dllimport) void inlineFuncTmpl<ExplicitDecl_Imported>();
549 // MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitInst_Imported@@@@YAXXZ"()
550 // MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
551 // GNU-DAG: declare dllimport void @_Z8funcTmplI21ExplicitInst_ImportedEvv()
553 // MO1-DAG: define available_externally dllimport void @"\01??$funcTmpl@UExplicitInst_Imported@@@@YAXXZ"()
554 // MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
555 // GO1-DAG: define available_externally dllimport void @_Z8funcTmplI21ExplicitInst_ImportedEvv()
557 template __declspec(dllimport) void funcTmpl<ExplicitInst_Imported>();
558 template __declspec(dllimport) void inlineFuncTmpl<ExplicitInst_Imported>();
564 // MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitSpec_Imported@@@@YAXXZ"()
565 // GNU-DAG: declare dllimport void @_Z8funcTmplI21ExplicitSpec_ImportedEvv()
566 template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Imported>();
569 // MSC-DAG-FIXME: declare dllimport void @"\01??$funcTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
570 // MO1-DAG-FIXME: define available_externally dllimport void @"\01??$funcTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
572 //template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Def_Imported>() {}
576 // MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
578 // MO1-DAG: define available_externally dllimport void @"\01??$funcTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
580 template<> __declspec(dllimport) inline void funcTmpl<ExplicitSpec_InlineDef_Imported>() {}
589 struct __declspec(dllimport) T {
591 // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?a@T@@QAEXXZ"
594 // MO1-DAG: @"\01?b@T@@2HA" = external dllimport global i32
597 // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0@AAU0@@Z"
600 // Note: Don't mark inline move operators dllimport because current MSVC versions don't export them.
602 // M19-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0@$$QAU0@@Z"
609 template <typename T> struct __declspec(dllimport) U { void foo() {} };
610 // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?foo@?$U@H@@QAEXXZ"
611 struct __declspec(dllimport) V : public U<int> { };
614 struct __declspec(dllimport) W { virtual void foo() {} };
617 // MO1-DAG: @"\01??_7W@@6B@" = available_externally dllimport unnamed_addr constant [1 x i8*] [i8* bitcast (void (%struct.W*)* @"\01?foo@W@@UAEXXZ" to i8*)]
618 // GO1-DAG: @_ZTV1W = available_externally dllimport unnamed_addr constant [3 x i8*] [i8* null, i8* null, i8* bitcast (void (%struct.W*)* @_ZN1W3fooEv to i8*)]
620 struct __declspec(dllimport) KeyFuncClass {
625 // G32-DAG: @_ZTV12KeyFuncClass = external dllimport unnamed_addr constant [3 x i8*]
627 struct __declspec(dllimport) X : public virtual W {};
630 // MO1-DAG: @"\01??_8X@@7B@" = available_externally dllimport unnamed_addr constant [2 x i32] [i32 0, i32 4]
632 struct __declspec(dllimport) Y {
636 struct __declspec(dllimport) Z { virtual ~Z() {} };
639 // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01??1Z@@UAE@XZ"
642 struct __declspec(dllimport) A { ~A(); };
643 struct __declspec(dllimport) B : A { ~B(); };
647 // MO1-DAG: available_externally dllimport x86_thiscallcc void @"\01??1B@DontUseDtorAlias@@QAE@XZ"
652 // Don't dllimport the vtordisp.
659 class __declspec(dllimport) C : virtual public Base {
669 template <typename T> struct __declspec(dllimport) S {
673 // MSC-DAG: @"\01?x@?$S@H@ClassTemplateStaticDef@@2HA" = available_externally dllimport global i32 0
678 template <typename A> struct __declspec(dllimport) T<A*> {
682 // GNU-DAG: @_ZN22ClassTemplateStaticDef1TIPvE1xE = available_externally dllimport global i32 0
687 // Don't dynamically initialize dllimport vars.
694 template struct __declspec(dllimport) A<int>;
695 // MSC-DAG: @"\01?x@?$A@H@PR19933@@2UNonPOD@2@A" = available_externally dllimport global %"struct.PR19933::NonPOD" zeroinitializer
700 template struct __declspec(dllimport) B<int>;
701 // MSC-DAG: @"\01?x@?$B@H@PR19933@@2HA" = available_externally dllimport global i32 0
706 template struct __declspec(dllimport) C<int>;
707 // MSC-DAG: @"\01?x@?$C@H@PR19933@@2HA" = available_externally dllimport global i32 42
712 template struct __declspec(dllimport) D<42>;
713 // MSC-DAG: @"\01?x@?$D@$0CK@@PR19933@@2HA" = available_externally dllimport global i32 43
714 // MSC-DAG: @"\01?y@?$D@$0CK@@PR19933@@2HA" = available_externally dllimport global i32 0
718 struct __declspec(dllimport) S {
726 // GNU-DAG: @_ZTVN7PR213551SE = available_externally dllimport unnamed_addr constant [4 x i8*]
730 struct __declspec(dllimport) S {
742 template <typename T> struct __declspec(dllimport) PartiallySpecializedClassTemplate<T*> { void f(); };
745 // G32-DAG: declare dllimport x86_thiscallcc void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv
749 template <> struct __declspec(dllimport) ExplicitlySpecializedClassTemplate<void*> { void f(); };
751 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?f@?$ExplicitlySpecializedClassTemplate@PAX@@QAEXXZ"
752 // G32-DAG: declare dllimport x86_thiscallcc void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv
755 template <typename T> struct __declspec(dllimport) PartiallySpecializedImportedClassTemplate {};
758 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$PartiallySpecializedImportedClassTemplate@PAX@@QAEXXZ"
763 template struct __declspec(dllimport) ExplicitlyInstantiatedWithDifferentAttr<int>;
765 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitlyInstantiatedWithDifferentAttr@H@@QAEXXZ"
769 template struct __declspec(dllimport) ExplicitInstantiationDeclImportedDefTemplate<int>;
772 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclImportedDefTemplate@H@@QAEXXZ"
773 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclImportedDefTemplate* @"\01??0?$ExplicitInstantiationDeclImportedDefTemplate@H@@QAE@XZ"
776 template <typename T> struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate { void f() {} ExplicitInstantiationDeclExportedDefImportedTemplate() {} };
777 extern template struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate <int>;
781 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitInstantiationDeclExportedDefImportedTemplate@H@@QAEXXZ"
782 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclExportedDefImportedTemplate* @"\01??0?$ExplicitInstantiationDeclExportedDefImportedTemplate@H@@QAE@XZ"
787 template struct __declspec(dllimport) PR23770DerivedTemplate<int>;
789 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?f@?$PR23770BaseTemplate@H@@QAEXXZ"
798 template <typename T> struct __declspec(dllimport) ImportedClassTemplate { void func(); };
806 template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func(); };
814 template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
818 struct __declspec(dllimport) DerivedFromTemplate : public ClassTemplate<int> {};
820 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ClassTemplate@H@@QAEXXZ"
824 struct __declspec(dllimport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
826 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ImportedClassTemplate@H@@QAEXXZ"
827 // G32-DAG: declare dllimport x86_thiscallcc void @_ZN21ImportedClassTemplateIiE4funcEv
830 struct __declspec(dllimport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
837 struct __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
839 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
844 struct __declspec(dllimport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
850 struct __declspec(dllimport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
856 struct __declspec(dllimport) DerivedFromExplicitlyExportSpecializedTemplate : public ExplicitlyExportSpecializedTemplate<int> {};
862 struct __declspec(dllimport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
864 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ExplicitlyImportSpecializedTemplate@H@@QAEXXZ"
865 // G32-DAG: declare dllimport x86_thiscallcc void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv
868 struct __declspec(dllimport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};
874 struct __declspec(dllimport) DerivedFromExplicitlyExportInstantiatedTemplate : public ExplicitlyExportInstantiatedTemplate<int> {};
880 struct __declspec(dllimport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
882 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ExplicitlyImportInstantiatedTemplate@H@@QAEXXZ"
883 // G32-DAG: declare dllimport x86_thiscallcc void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv
888 struct __declspec(dllimport) BottomClass : public MiddleClass<int> { };
890 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ"
895 struct __declspec(dllimport) DerivedFromExplicitInstantiationDeclTemplateBase : public ExplicitInstantiationDeclTemplateBase<int> {};
898 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase@H@@QAEXXZ"
903 struct __declspec(dllimport) DerivedFromExplicitInstantiationDeclTemplateBase2 : public ExplicitInstantiationDeclTemplateBase2<int> {};
906 // M32-DAG: declare dllimport x86_thiscallcc void @"\01?func@?$ExplicitInstantiationDeclTemplateBase2@H@@QAEXXZ"