xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/dllimport-members.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | 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 -DMSABI | 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 // RUN: %clang_cc1 -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O1 -o - %s -DMSABI | FileCheck --check-prefix=MO1 %s
6*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O1 -o - %s         | FileCheck --check-prefix=GO1 %s
7*0a6a1f1dSLionel Sambuc 
8*0a6a1f1dSLionel Sambuc // Helper structs to make templates more expressive.
9*0a6a1f1dSLionel Sambuc struct ImplicitInst_Imported {};
10*0a6a1f1dSLionel Sambuc struct ExplicitDecl_Imported {};
11*0a6a1f1dSLionel Sambuc struct ExplicitInst_Imported {};
12*0a6a1f1dSLionel Sambuc struct ExplicitSpec_Imported {};
13*0a6a1f1dSLionel Sambuc struct ExplicitSpec_Def_Imported {};
14*0a6a1f1dSLionel Sambuc struct ExplicitSpec_InlineDef_Imported {};
15*0a6a1f1dSLionel Sambuc struct ExplicitSpec_NotImported {};
16*0a6a1f1dSLionel Sambuc 
17*0a6a1f1dSLionel Sambuc #define JOIN2(x, y) x##y
18*0a6a1f1dSLionel Sambuc #define JOIN(x, y) JOIN2(x, y)
19*0a6a1f1dSLionel Sambuc #define UNIQ(name) JOIN(name, __LINE__)
20*0a6a1f1dSLionel Sambuc #define USE(func) void UNIQ(use)() { func(); }
21*0a6a1f1dSLionel Sambuc #define USEMV(cls, var) int UNIQ(use)() { return ref(cls::var); }
22*0a6a1f1dSLionel Sambuc #define USEMF(cls, fun) template<> void useMemFun<__LINE__, cls>() { cls().fun(); }
23*0a6a1f1dSLionel Sambuc #define USESPECIALS(cls) void UNIQ(use)() { useSpecials<cls>(); }
24*0a6a1f1dSLionel Sambuc 
25*0a6a1f1dSLionel Sambuc template<typename T>
ref(T const & v)26*0a6a1f1dSLionel Sambuc T ref(T const& v) { return v; }
27*0a6a1f1dSLionel Sambuc 
28*0a6a1f1dSLionel Sambuc template<int Line, typename T>
29*0a6a1f1dSLionel Sambuc void useMemFun();
30*0a6a1f1dSLionel Sambuc 
31*0a6a1f1dSLionel Sambuc template<typename T>
useSpecials()32*0a6a1f1dSLionel Sambuc void useSpecials() {
33*0a6a1f1dSLionel Sambuc   T v; // Default constructor
34*0a6a1f1dSLionel Sambuc 
35*0a6a1f1dSLionel Sambuc   T c1(static_cast<const T&>(v)); // Copy constructor
36*0a6a1f1dSLionel Sambuc   T c2 = static_cast<const T&>(v); // Copy constructor
37*0a6a1f1dSLionel Sambuc   T c3;
38*0a6a1f1dSLionel Sambuc   c3 = static_cast<const T&>(v); // Copy assignment
39*0a6a1f1dSLionel Sambuc 
40*0a6a1f1dSLionel Sambuc   T m1(static_cast<T&&>(v)); // Move constructor
41*0a6a1f1dSLionel Sambuc   T m2 = static_cast<T&&>(v); // Move constructor
42*0a6a1f1dSLionel Sambuc   T m3;
43*0a6a1f1dSLionel Sambuc   m3 = static_cast<T&&>(v); // Move assignment
44*0a6a1f1dSLionel Sambuc }
45*0a6a1f1dSLionel Sambuc 
46*0a6a1f1dSLionel Sambuc // Used to force non-trivial special members.
47*0a6a1f1dSLionel Sambuc struct ForceNonTrivial {
48*0a6a1f1dSLionel Sambuc   ForceNonTrivial();
49*0a6a1f1dSLionel Sambuc   ~ForceNonTrivial();
50*0a6a1f1dSLionel Sambuc   ForceNonTrivial(const ForceNonTrivial&);
51*0a6a1f1dSLionel Sambuc   ForceNonTrivial& operator=(const ForceNonTrivial&);
52*0a6a1f1dSLionel Sambuc   ForceNonTrivial(ForceNonTrivial&&);
53*0a6a1f1dSLionel Sambuc   ForceNonTrivial& operator=(ForceNonTrivial&&);
54*0a6a1f1dSLionel Sambuc };
55*0a6a1f1dSLionel Sambuc 
56*0a6a1f1dSLionel Sambuc 
57*0a6a1f1dSLionel Sambuc 
58*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
59*0a6a1f1dSLionel Sambuc // Class members
60*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
61*0a6a1f1dSLionel Sambuc 
62*0a6a1f1dSLionel Sambuc // Import individual members of a class.
63*0a6a1f1dSLionel Sambuc struct ImportMembers {
64*0a6a1f1dSLionel Sambuc   struct Nested;
65*0a6a1f1dSLionel Sambuc 
66*0a6a1f1dSLionel Sambuc   // M32-DAG: define              x86_thiscallcc void @"\01?normalDef@ImportMembers@@QAEXXZ"(%struct.ImportMembers* %this)
67*0a6a1f1dSLionel Sambuc   // M64-DAG: define                             void @"\01?normalDef@ImportMembers@@QEAAXXZ"(%struct.ImportMembers* %this)
68*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalDecl@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
69*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalDecl@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
70*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalInclass@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
71*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalInclass@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
72*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalInlineDef@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
73*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalInlineDef@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
74*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalInlineDecl@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
75*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalInlineDecl@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
76*0a6a1f1dSLionel Sambuc   // G32-DAG: define              x86_thiscallcc void @_ZN13ImportMembers9normalDefEv(%struct.ImportMembers* %this)
77*0a6a1f1dSLionel Sambuc   // G64-DAG: define                             void @_ZN13ImportMembers9normalDefEv(%struct.ImportMembers* %this)
78*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers10normalDeclEv(%struct.ImportMembers*)
79*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                  void @_ZN13ImportMembers10normalDeclEv(%struct.ImportMembers*)
80*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(%struct.ImportMembers* %this)
81*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers13normalInclassEv(%struct.ImportMembers* %this)
82*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(%struct.ImportMembers* %this)
83*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers15normalInlineDefEv(%struct.ImportMembers* %this)
84*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(%struct.ImportMembers* %this)
85*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers16normalInlineDeclEv(%struct.ImportMembers* %this)
86*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInclass@ImportMembers@@QAEXXZ"(
87*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDef@ImportMembers@@QAEXXZ"(
88*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDecl@ImportMembers@@QAEXXZ"(
89*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(
90*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(
91*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(
92*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalDef(); // dllimport ignored
93*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalDecl();
normalInclassImportMembers94*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalInclass() {}
95*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalInlineDef();
96*0a6a1f1dSLionel Sambuc   __declspec(dllimport)         inline void normalInlineDecl();
97*0a6a1f1dSLionel Sambuc 
98*0a6a1f1dSLionel Sambuc   // M32-DAG: define              x86_thiscallcc void @"\01?virtualDef@ImportMembers@@UAEXXZ"(%struct.ImportMembers* %this)
99*0a6a1f1dSLionel Sambuc   // M64-DAG: define                             void @"\01?virtualDef@ImportMembers@@UEAAXXZ"(%struct.ImportMembers* %this)
100*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualDecl@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
101*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualDecl@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
102*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualInclass@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
103*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualInclass@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
104*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualInlineDef@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
105*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualInlineDef@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
106*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualInlineDecl@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
107*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualInlineDecl@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
108*0a6a1f1dSLionel Sambuc   // G32-DAG: define              x86_thiscallcc void @_ZN13ImportMembers10virtualDefEv(%struct.ImportMembers* %this)
109*0a6a1f1dSLionel Sambuc   // G64-DAG: define                             void @_ZN13ImportMembers10virtualDefEv(%struct.ImportMembers* %this)
110*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers11virtualDeclEv(%struct.ImportMembers*)
111*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                  void @_ZN13ImportMembers11virtualDeclEv(%struct.ImportMembers*)
112*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(%struct.ImportMembers* %this)
113*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers14virtualInclassEv(%struct.ImportMembers* %this)
114*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(%struct.ImportMembers* %this)
115*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers16virtualInlineDefEv(%struct.ImportMembers* %this)
116*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(%struct.ImportMembers* %this)
117*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers17virtualInlineDeclEv(%struct.ImportMembers* %this)
118*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInclass@ImportMembers@@UAEXXZ"(
119*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDef@ImportMembers@@UAEXXZ"(
120*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDecl@ImportMembers@@UAEXXZ"(
121*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(
122*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(
123*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(
124*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualDef(); // dllimport ignored
125*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualDecl();
virtualInclassImportMembers126*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualInclass() {}
127*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualInlineDef();
128*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual inline void virtualInlineDecl();
129*0a6a1f1dSLionel Sambuc 
130*0a6a1f1dSLionel Sambuc   // MSC-DAG: define                           void @"\01?staticDef@ImportMembers@@SAXXZ"()
131*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticDecl@ImportMembers@@SAXXZ"()
132*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticInclass@ImportMembers@@SAXXZ"()
133*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticInlineDef@ImportMembers@@SAXXZ"()
134*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticInlineDecl@ImportMembers@@SAXXZ"()
135*0a6a1f1dSLionel Sambuc   // GNU-DAG: define                           void @_ZN13ImportMembers9staticDefEv()
136*0a6a1f1dSLionel Sambuc   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers10staticDeclEv()
137*0a6a1f1dSLionel Sambuc   // GNU-DAG: define linkonce_odr              void @_ZN13ImportMembers13staticInclassEv()
138*0a6a1f1dSLionel Sambuc   // GNU-DAG: define linkonce_odr              void @_ZN13ImportMembers15staticInlineDefEv()
139*0a6a1f1dSLionel Sambuc   // GNU-DAG: define linkonce_odr              void @_ZN13ImportMembers16staticInlineDeclEv()
140*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport void @"\01?staticInclass@ImportMembers@@SAXXZ"()
141*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDef@ImportMembers@@SAXXZ"()
142*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDecl@ImportMembers@@SAXXZ"()
143*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr              void @_ZN13ImportMembers13staticInclassEv()
144*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr              void @_ZN13ImportMembers15staticInlineDefEv()
145*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr              void @_ZN13ImportMembers16staticInlineDeclEv()
146*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticDef(); // dllimport ignored
147*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticDecl();
staticInclassImportMembers148*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticInclass() {}
149*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticInlineDef();
150*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  inline void staticInlineDecl();
151*0a6a1f1dSLionel Sambuc 
152*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc void @"\01?protectedNormalDecl@ImportMembers@@IAEXXZ"(%struct.ImportMembers*)
153*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                void @"\01?protectedNormalDecl@ImportMembers@@IEAAXXZ"(%struct.ImportMembers*)
154*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers19protectedNormalDeclEv(%struct.ImportMembers*)
155*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void @_ZN13ImportMembers19protectedNormalDeclEv(%struct.ImportMembers*)
156*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?protectedStaticDecl@ImportMembers@@KAXXZ"()
157*0a6a1f1dSLionel Sambuc   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers19protectedStaticDeclEv()
158*0a6a1f1dSLionel Sambuc protected:
159*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void protectedNormalDecl();
160*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void protectedStaticDecl();
161*0a6a1f1dSLionel Sambuc 
162*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc void @"\01?privateNormalDecl@ImportMembers@@AAEXXZ"(%struct.ImportMembers*)
163*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                void @"\01?privateNormalDecl@ImportMembers@@AEAAXXZ"(%struct.ImportMembers*)
164*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers17privateNormalDeclEv(%struct.ImportMembers*)
165*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void @_ZN13ImportMembers17privateNormalDeclEv(%struct.ImportMembers*)
166*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?privateStaticDecl@ImportMembers@@CAXXZ"()
167*0a6a1f1dSLionel Sambuc   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers17privateStaticDeclEv()
168*0a6a1f1dSLionel Sambuc private:
169*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void privateNormalDecl();
170*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void privateStaticDecl();
171*0a6a1f1dSLionel Sambuc 
172*0a6a1f1dSLionel Sambuc   // M32-DAG: declare           x86_thiscallcc void @"\01?ignored@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
173*0a6a1f1dSLionel Sambuc   // M64-DAG: declare                          void @"\01?ignored@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
174*0a6a1f1dSLionel Sambuc   // G32-DAG: declare           x86_thiscallcc void @_ZN13ImportMembers7ignoredEv(%struct.ImportMembers*)
175*0a6a1f1dSLionel Sambuc   // G64-DAG: declare                          void @_ZN13ImportMembers7ignoredEv(%struct.ImportMembers*)
176*0a6a1f1dSLionel Sambuc public:
177*0a6a1f1dSLionel Sambuc   void ignored();
178*0a6a1f1dSLionel Sambuc 
179*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticField@ImportMembers@@2HA"               = external dllimport global i32
180*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstField@ImportMembers@@2HB"          = external dllimport constant i32
181*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldEqualInit@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
182*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldBraceInit@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
183*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?ConstexprField@ImportMembers@@2HB"            = available_externally dllimport constant i32 1, align 4
184*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers11StaticFieldE                   = external dllimport global i32
185*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers16StaticConstFieldE              = external dllimport constant i32
186*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers25StaticConstFieldEqualInitE     = external dllimport constant i32
187*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers25StaticConstFieldBraceInitE     = external dllimport constant i32
188*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers14ConstexprFieldE                = external dllimport constant i32
189*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         int  StaticField;
190*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  const  int  StaticConstField;
191*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  const  int  StaticConstFieldEqualInit = 1;
192*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  const  int  StaticConstFieldBraceInit{1};
193*0a6a1f1dSLionel Sambuc   __declspec(dllimport) constexpr static int ConstexprField = 1;
194*0a6a1f1dSLionel Sambuc 
195*0a6a1f1dSLionel Sambuc   template<int Line, typename T> friend void useMemFun();
196*0a6a1f1dSLionel Sambuc };
197*0a6a1f1dSLionel Sambuc 
normalDef()198*0a6a1f1dSLionel Sambuc        void ImportMembers::normalDef() {} // dllimport ignored
normalInlineDef()199*0a6a1f1dSLionel Sambuc inline void ImportMembers::normalInlineDef() {}
normalInlineDecl()200*0a6a1f1dSLionel Sambuc        void ImportMembers::normalInlineDecl() {}
virtualDef()201*0a6a1f1dSLionel Sambuc        void ImportMembers::virtualDef() {} // dllimport ignored
virtualInlineDef()202*0a6a1f1dSLionel Sambuc inline void ImportMembers::virtualInlineDef() {}
virtualInlineDecl()203*0a6a1f1dSLionel Sambuc        void ImportMembers::virtualInlineDecl() {}
staticDef()204*0a6a1f1dSLionel Sambuc        void ImportMembers::staticDef() {} // dllimport ignored
staticInlineDef()205*0a6a1f1dSLionel Sambuc inline void ImportMembers::staticInlineDef() {}
staticInlineDecl()206*0a6a1f1dSLionel Sambuc        void ImportMembers::staticInlineDecl() {}
207*0a6a1f1dSLionel Sambuc 
208*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, normalDef)
209*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, normalDecl)
210*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, normalInclass)
211*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, normalInlineDef)
212*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, normalInlineDecl)
213*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, virtualDef)
214*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, virtualDecl)
215*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, virtualInclass)
216*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, virtualInlineDef)
217*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, virtualInlineDecl)
218*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, staticDef)
219*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, staticDecl)
220*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, staticInclass)
221*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, staticInlineDef)
222*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, staticInlineDecl)
223*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, protectedNormalDecl)
224*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, protectedStaticDecl)
225*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, privateNormalDecl)
226*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, privateStaticDecl)
227*0a6a1f1dSLionel Sambuc USEMF(ImportMembers, ignored)
228*0a6a1f1dSLionel Sambuc 
229*0a6a1f1dSLionel Sambuc USEMV(ImportMembers, StaticField)
230*0a6a1f1dSLionel Sambuc USEMV(ImportMembers, StaticConstField)
231*0a6a1f1dSLionel Sambuc USEMV(ImportMembers, StaticConstFieldEqualInit)
232*0a6a1f1dSLionel Sambuc USEMV(ImportMembers, StaticConstFieldBraceInit)
233*0a6a1f1dSLionel Sambuc USEMV(ImportMembers, ConstexprField)
234*0a6a1f1dSLionel Sambuc 
235*0a6a1f1dSLionel Sambuc 
236*0a6a1f1dSLionel Sambuc // Import individual members of a nested class.
237*0a6a1f1dSLionel Sambuc struct ImportMembers::Nested {
238*0a6a1f1dSLionel Sambuc   // M32-DAG: define              x86_thiscallcc void @"\01?normalDef@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* %this)
239*0a6a1f1dSLionel Sambuc   // M64-DAG: define                             void @"\01?normalDef@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* %this)
240*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalDecl@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
241*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalDecl@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
242*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalInclass@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
243*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalInclass@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
244*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalInlineDef@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
245*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalInlineDef@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
246*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?normalInlineDecl@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
247*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?normalInlineDecl@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
248*0a6a1f1dSLionel Sambuc   // G32-DAG: define              x86_thiscallcc void @_ZN13ImportMembers6Nested9normalDefEv(%"struct.ImportMembers::Nested"* %this)
249*0a6a1f1dSLionel Sambuc   // G64-DAG: define                             void @_ZN13ImportMembers6Nested9normalDefEv(%"struct.ImportMembers::Nested"* %this)
250*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers6Nested10normalDeclEv(%"struct.ImportMembers::Nested"*)
251*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                  void @_ZN13ImportMembers6Nested10normalDeclEv(%"struct.ImportMembers::Nested"*)
252*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(%"struct.ImportMembers::Nested"* %this)
253*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers6Nested13normalInclassEv(%"struct.ImportMembers::Nested"* %this)
254*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(%"struct.ImportMembers::Nested"* %this)
255*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers6Nested15normalInlineDefEv(%"struct.ImportMembers::Nested"* %this)
256*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(%"struct.ImportMembers::Nested"* %this)
257*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers6Nested16normalInlineDeclEv(%"struct.ImportMembers::Nested"* %this)
258*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInclass@Nested@ImportMembers@@QAEXXZ"(
259*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDef@Nested@ImportMembers@@QAEXXZ"(
260*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDecl@Nested@ImportMembers@@QAEXXZ"(
261*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(
262*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(
263*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(
264*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalDef(); // dllimport ignored
265*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalDecl();
normalInclassImportMembers::Nested266*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalInclass() {}
267*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void normalInlineDef();
268*0a6a1f1dSLionel Sambuc   __declspec(dllimport)         inline void normalInlineDecl();
269*0a6a1f1dSLionel Sambuc 
270*0a6a1f1dSLionel Sambuc   // M32-DAG: define              x86_thiscallcc void @"\01?virtualDef@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* %this)
271*0a6a1f1dSLionel Sambuc   // M64-DAG: define                             void @"\01?virtualDef@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* %this)
272*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualDecl@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
273*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualDecl@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
274*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualInclass@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
275*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualInclass@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
276*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualInlineDef@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
277*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualInlineDef@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
278*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01?virtualInlineDecl@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
279*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01?virtualInlineDecl@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
280*0a6a1f1dSLionel Sambuc   // G32-DAG: define              x86_thiscallcc void @_ZN13ImportMembers6Nested10virtualDefEv(%"struct.ImportMembers::Nested"* %this)
281*0a6a1f1dSLionel Sambuc   // G64-DAG: define                             void @_ZN13ImportMembers6Nested10virtualDefEv(%"struct.ImportMembers::Nested"* %this)
282*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers6Nested11virtualDeclEv(%"struct.ImportMembers::Nested"*)
283*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                  void @_ZN13ImportMembers6Nested11virtualDeclEv(%"struct.ImportMembers::Nested"*)
284*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv(%"struct.ImportMembers::Nested"* %this)
285*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers6Nested14virtualInclassEv(%"struct.ImportMembers::Nested"* %this)
286*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv(%"struct.ImportMembers::Nested"* %this)
287*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers6Nested16virtualInlineDefEv(%"struct.ImportMembers::Nested"* %this)
288*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(%"struct.ImportMembers::Nested"* %this)
289*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(%"struct.ImportMembers::Nested"* %this)
290*0a6a1f1dSLionel Sambuc 
291*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInclass@Nested@ImportMembers@@UAEXXZ"(
292*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDef@Nested@ImportMembers@@UAEXXZ"(
293*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDecl@Nested@ImportMembers@@UAEXXZ"(
294*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc                   void @_ZN13ImportMembers6Nested14virtualInclassEv(
295*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc                   void @_ZN13ImportMembers6Nested16virtualInlineDefEv(
296*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc                   void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(
297*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualDef(); // dllimport ignored
298*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualDecl();
virtualInclassImportMembers::Nested299*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualInclass() {}
300*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual        void virtualInlineDef();
301*0a6a1f1dSLionel Sambuc   __declspec(dllimport) virtual inline void virtualInlineDecl();
302*0a6a1f1dSLionel Sambuc 
303*0a6a1f1dSLionel Sambuc   // MSC-DAG: define                           void @"\01?staticDef@Nested@ImportMembers@@SAXXZ"()
304*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticDecl@Nested@ImportMembers@@SAXXZ"()
305*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticInclass@Nested@ImportMembers@@SAXXZ"()
306*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticInlineDef@Nested@ImportMembers@@SAXXZ"()
307*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?staticInlineDecl@Nested@ImportMembers@@SAXXZ"()
308*0a6a1f1dSLionel Sambuc   // GNU-DAG: define                           void @_ZN13ImportMembers6Nested9staticDefEv()
309*0a6a1f1dSLionel Sambuc   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers6Nested10staticDeclEv()
310*0a6a1f1dSLionel Sambuc   // GNU-DAG: define linkonce_odr              void @_ZN13ImportMembers6Nested13staticInclassEv()
311*0a6a1f1dSLionel Sambuc   // GNU-DAG: define linkonce_odr              void @_ZN13ImportMembers6Nested15staticInlineDefEv()
312*0a6a1f1dSLionel Sambuc   // GNU-DAG: define linkonce_odr              void @_ZN13ImportMembers6Nested16staticInlineDeclEv()
313*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport void @"\01?staticInclass@Nested@ImportMembers@@SAXXZ"()
314*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDef@Nested@ImportMembers@@SAXXZ"()
315*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDecl@Nested@ImportMembers@@SAXXZ"()
316*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr              void @_ZN13ImportMembers6Nested13staticInclassEv()
317*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr              void @_ZN13ImportMembers6Nested15staticInlineDefEv()
318*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr              void @_ZN13ImportMembers6Nested16staticInlineDeclEv()
319*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticDef(); // dllimport ignored
320*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticDecl();
staticInclassImportMembers::Nested321*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticInclass() {}
322*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void staticInlineDef();
323*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  inline void staticInlineDecl();
324*0a6a1f1dSLionel Sambuc 
325*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc void @"\01?protectedNormalDecl@Nested@ImportMembers@@IAEXXZ"(%"struct.ImportMembers::Nested"*)
326*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                void @"\01?protectedNormalDecl@Nested@ImportMembers@@IEAAXXZ"(%"struct.ImportMembers::Nested"*)
327*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(%"struct.ImportMembers::Nested"*)
328*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(%"struct.ImportMembers::Nested"*)
329*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?protectedStaticDecl@Nested@ImportMembers@@KAXXZ"()
330*0a6a1f1dSLionel Sambuc   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers6Nested19protectedStaticDeclEv()
331*0a6a1f1dSLionel Sambuc protected:
332*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void protectedNormalDecl();
333*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void protectedStaticDecl();
334*0a6a1f1dSLionel Sambuc 
335*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc void @"\01?privateNormalDecl@Nested@ImportMembers@@AAEXXZ"(%"struct.ImportMembers::Nested"*)
336*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                void @"\01?privateNormalDecl@Nested@ImportMembers@@AEAAXXZ"(%"struct.ImportMembers::Nested"*)
337*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17privateNormalDeclEv(%"struct.ImportMembers::Nested"*)
338*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void @_ZN13ImportMembers6Nested17privateNormalDeclEv(%"struct.ImportMembers::Nested"*)
339*0a6a1f1dSLionel Sambuc   // MSC-DAG: declare dllimport                void @"\01?privateStaticDecl@Nested@ImportMembers@@CAXXZ"()
340*0a6a1f1dSLionel Sambuc   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers6Nested17privateStaticDeclEv()
341*0a6a1f1dSLionel Sambuc private:
342*0a6a1f1dSLionel Sambuc   __declspec(dllimport)                void privateNormalDecl();
343*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         void privateStaticDecl();
344*0a6a1f1dSLionel Sambuc 
345*0a6a1f1dSLionel Sambuc   // M32-DAG: declare           x86_thiscallcc void @"\01?ignored@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
346*0a6a1f1dSLionel Sambuc   // M64-DAG: declare                          void @"\01?ignored@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
347*0a6a1f1dSLionel Sambuc   // G32-DAG: declare           x86_thiscallcc void @_ZN13ImportMembers6Nested7ignoredEv(%"struct.ImportMembers::Nested"*)
348*0a6a1f1dSLionel Sambuc   // G64-DAG: declare                          void @_ZN13ImportMembers6Nested7ignoredEv(%"struct.ImportMembers::Nested"*)
349*0a6a1f1dSLionel Sambuc public:
350*0a6a1f1dSLionel Sambuc   void ignored();
351*0a6a1f1dSLionel Sambuc 
352*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticField@Nested@ImportMembers@@2HA"               = external dllimport global i32
353*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstField@Nested@ImportMembers@@2HB"          = external dllimport constant i32
354*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldEqualInit@Nested@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
355*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?StaticConstFieldBraceInit@Nested@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
356*0a6a1f1dSLionel Sambuc   // MSC-DAG: @"\01?ConstexprField@Nested@ImportMembers@@2HB"            = available_externally dllimport constant i32 1, align 4
357*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers6Nested11StaticFieldE                   = external dllimport global i32
358*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers6Nested16StaticConstFieldE              = external dllimport constant i32
359*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers6Nested25StaticConstFieldEqualInitE     = external dllimport constant i32
360*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers6Nested25StaticConstFieldBraceInitE     = external dllimport constant i32
361*0a6a1f1dSLionel Sambuc   // GNU-DAG: @_ZN13ImportMembers6Nested14ConstexprFieldE                = external dllimport constant i32
362*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static         int  StaticField;
363*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  const  int  StaticConstField;
364*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  const  int  StaticConstFieldEqualInit = 1;
365*0a6a1f1dSLionel Sambuc   __declspec(dllimport) static  const  int  StaticConstFieldBraceInit{1};
366*0a6a1f1dSLionel Sambuc   __declspec(dllimport) constexpr static int ConstexprField = 1;
367*0a6a1f1dSLionel Sambuc 
368*0a6a1f1dSLionel Sambuc   template<int Line, typename T> friend void useMemFun();
369*0a6a1f1dSLionel Sambuc };
370*0a6a1f1dSLionel Sambuc 
normalDef()371*0a6a1f1dSLionel Sambuc        void ImportMembers::Nested::normalDef() {} // dllimport ignored
normalInlineDef()372*0a6a1f1dSLionel Sambuc inline void ImportMembers::Nested::normalInlineDef() {}
normalInlineDecl()373*0a6a1f1dSLionel Sambuc        void ImportMembers::Nested::normalInlineDecl() {}
virtualDef()374*0a6a1f1dSLionel Sambuc        void ImportMembers::Nested::virtualDef() {} // dllimport ignored
virtualInlineDef()375*0a6a1f1dSLionel Sambuc inline void ImportMembers::Nested::virtualInlineDef() {}
virtualInlineDecl()376*0a6a1f1dSLionel Sambuc        void ImportMembers::Nested::virtualInlineDecl() {}
staticDef()377*0a6a1f1dSLionel Sambuc        void ImportMembers::Nested::staticDef() {} // dllimport ignored
staticInlineDef()378*0a6a1f1dSLionel Sambuc inline void ImportMembers::Nested::staticInlineDef() {}
staticInlineDecl()379*0a6a1f1dSLionel Sambuc        void ImportMembers::Nested::staticInlineDecl() {}
380*0a6a1f1dSLionel Sambuc 
381*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, normalDef)
382*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, normalDecl)
383*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, normalInclass)
384*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, normalInlineDef)
385*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, normalInlineDecl)
386*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, virtualDef)
387*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, virtualDecl)
388*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, virtualInclass)
389*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, virtualInlineDef)
390*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, virtualInlineDecl)
391*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, staticDef)
392*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, staticDecl)
393*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, staticInclass)
394*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, staticInlineDef)
395*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, staticInlineDecl)
396*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, protectedNormalDecl)
397*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, protectedStaticDecl)
398*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, privateNormalDecl)
399*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, privateStaticDecl)
400*0a6a1f1dSLionel Sambuc USEMF(ImportMembers::Nested, ignored)
401*0a6a1f1dSLionel Sambuc 
402*0a6a1f1dSLionel Sambuc USEMV(ImportMembers::Nested, StaticField)
403*0a6a1f1dSLionel Sambuc USEMV(ImportMembers::Nested, StaticConstField)
404*0a6a1f1dSLionel Sambuc USEMV(ImportMembers::Nested, StaticConstFieldEqualInit)
405*0a6a1f1dSLionel Sambuc USEMV(ImportMembers::Nested, StaticConstFieldBraceInit)
406*0a6a1f1dSLionel Sambuc USEMV(ImportMembers::Nested, ConstexprField)
407*0a6a1f1dSLionel Sambuc 
408*0a6a1f1dSLionel Sambuc 
409*0a6a1f1dSLionel Sambuc // Import special member functions.
410*0a6a1f1dSLionel Sambuc struct ImportSpecials {
411*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@XZ"(%struct.ImportSpecials* returned)
412*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@XZ"(%struct.ImportSpecials* returned)
413*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1Ev(%struct.ImportSpecials*)
414*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1Ev(%struct.ImportSpecials*)
415*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportSpecials();
416*0a6a1f1dSLionel Sambuc 
417*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc void @"\01??1ImportSpecials@@QAE@XZ"(%struct.ImportSpecials*)
418*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                void @"\01??1ImportSpecials@@QEAA@XZ"(%struct.ImportSpecials*)
419*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials*)
420*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials*)
421*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ~ImportSpecials();
422*0a6a1f1dSLionel Sambuc 
423*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@ABU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
424*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@AEBU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
425*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
426*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
427*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportSpecials(const ImportSpecials&);
428*0a6a1f1dSLionel Sambuc 
429*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0@ABU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
430*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
431*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
432*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
433*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportSpecials& operator=(const ImportSpecials&);
434*0a6a1f1dSLionel Sambuc 
435*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@$$QAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
436*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
437*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
438*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
439*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportSpecials(ImportSpecials&&);
440*0a6a1f1dSLionel Sambuc 
441*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
442*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
443*0a6a1f1dSLionel Sambuc   // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
444*0a6a1f1dSLionel Sambuc   // G64-DAG: declare dllimport                dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
445*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportSpecials& operator=(ImportSpecials&&);
446*0a6a1f1dSLionel Sambuc };
447*0a6a1f1dSLionel Sambuc USESPECIALS(ImportSpecials)
448*0a6a1f1dSLionel Sambuc 
449*0a6a1f1dSLionel Sambuc 
450*0a6a1f1dSLionel Sambuc // Export inline special member functions.
451*0a6a1f1dSLionel Sambuc struct ImportInlineSpecials {
452*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@XZ"(%struct.ImportInlineSpecials* returned)
453*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@XZ"(%struct.ImportInlineSpecials* returned)
454*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(%struct.ImportInlineSpecials* %this)
455*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN20ImportInlineSpecialsC1Ev(%struct.ImportInlineSpecials* %this)
456*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@XZ"(
457*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(
ImportInlineSpecialsImportInlineSpecials458*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportInlineSpecials() {}
459*0a6a1f1dSLionel Sambuc 
460*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01??1ImportInlineSpecials@@QAE@XZ"(%struct.ImportInlineSpecials*)
461*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01??1ImportInlineSpecials@@QEAA@XZ"(%struct.ImportInlineSpecials*)
462*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(%struct.ImportInlineSpecials* %this)
463*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN20ImportInlineSpecialsD1Ev(%struct.ImportInlineSpecials* %this)
464*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01??1ImportInlineSpecials@@QAE@XZ"(
465*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(
~ImportInlineSpecialsImportInlineSpecials466*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ~ImportInlineSpecials() {}
467*0a6a1f1dSLionel Sambuc 
468*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@ABU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
469*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@AEBU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
470*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
471*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
472*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@ABU0@@Z"(
473*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(
474*0a6a1f1dSLionel Sambuc   __declspec(dllimport) inline ImportInlineSpecials(const ImportInlineSpecials&);
475*0a6a1f1dSLionel Sambuc 
476*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@ABU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
477*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
478*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
479*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
480*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@ABU0@@Z"(
481*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(
482*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportInlineSpecials& operator=(const ImportInlineSpecials&);
483*0a6a1f1dSLionel Sambuc 
484*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
485*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
486*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
487*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
488*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(
489*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(
ImportInlineSpecialsImportInlineSpecials490*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportInlineSpecials(ImportInlineSpecials&&) {}
491*0a6a1f1dSLionel Sambuc 
492*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
493*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
494*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
495*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials* %this, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
496*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
497*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(
operator =ImportInlineSpecials498*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportInlineSpecials& operator=(ImportInlineSpecials&&) { return *this; }
499*0a6a1f1dSLionel Sambuc };
ImportInlineSpecials(const ImportInlineSpecials &)500*0a6a1f1dSLionel Sambuc ImportInlineSpecials::ImportInlineSpecials(const ImportInlineSpecials&) {}
operator =(const ImportInlineSpecials &)501*0a6a1f1dSLionel Sambuc inline ImportInlineSpecials& ImportInlineSpecials::operator=(const ImportInlineSpecials&) { return *this; }
502*0a6a1f1dSLionel Sambuc USESPECIALS(ImportInlineSpecials)
503*0a6a1f1dSLionel Sambuc 
504*0a6a1f1dSLionel Sambuc 
505*0a6a1f1dSLionel Sambuc // Import defaulted member functions.
506*0a6a1f1dSLionel Sambuc struct ImportDefaulted {
507*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted* returned)
508*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@XZ"(%struct.ImportDefaulted* returned)
509*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void                     @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* %this)
510*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void                     @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* %this)
511*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted* returned %this)
512*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* %this)
513*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaulted() = default;
514*0a6a1f1dSLionel Sambuc 
515*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc void @"\01??1ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted*)
516*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  void @"\01??1ImportDefaulted@@QEAA@XZ"(%struct.ImportDefaulted*)
517*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* %this)
518*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* %this)
519*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01??1ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted* %this)
520*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* %this)
521*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ~ImportDefaulted() = default;
522*0a6a1f1dSLionel Sambuc 
523*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@ABU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
524*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@AEBU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
525*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void                     @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
526*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void                     @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
527*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@ABU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
528*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
529*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaulted(const ImportDefaulted&) = default;
530*0a6a1f1dSLionel Sambuc 
531*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@ABU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
532*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
533*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
534*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
535*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@ABU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
536*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
537*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaulted& operator=(const ImportDefaulted&) = default;
538*0a6a1f1dSLionel Sambuc 
539*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
540*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
541*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc void                     @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
542*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                void                     @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
543*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
544*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
545*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaulted(ImportDefaulted&&) = default;
546*0a6a1f1dSLionel Sambuc 
547*0a6a1f1dSLionel Sambuc   // M32-DAG: declare dllimport   x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
548*0a6a1f1dSLionel Sambuc   // M64-DAG: declare dllimport                  dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
549*0a6a1f1dSLionel Sambuc   // G32-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
550*0a6a1f1dSLionel Sambuc   // G64-DAG: define linkonce_odr                dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
551*0a6a1f1dSLionel Sambuc   // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
552*0a6a1f1dSLionel Sambuc   // GO1-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
553*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaulted& operator=(ImportDefaulted&&) = default;
554*0a6a1f1dSLionel Sambuc 
555*0a6a1f1dSLionel Sambuc   ForceNonTrivial v; // ensure special members are non-trivial
556*0a6a1f1dSLionel Sambuc };
557*0a6a1f1dSLionel Sambuc USESPECIALS(ImportDefaulted)
558*0a6a1f1dSLionel Sambuc 
559*0a6a1f1dSLionel Sambuc 
560*0a6a1f1dSLionel Sambuc // Import defaulted member function definitions.
561*0a6a1f1dSLionel Sambuc struct ImportDefaultedDefs {
562*0a6a1f1dSLionel Sambuc   __declspec(dllimport) inline ImportDefaultedDefs();
563*0a6a1f1dSLionel Sambuc   __declspec(dllimport) inline ~ImportDefaultedDefs();
564*0a6a1f1dSLionel Sambuc 
565*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaultedDefs(const ImportDefaultedDefs&);
566*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaultedDefs& operator=(const ImportDefaultedDefs&);
567*0a6a1f1dSLionel Sambuc 
568*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaultedDefs(ImportDefaultedDefs&&);
569*0a6a1f1dSLionel Sambuc   __declspec(dllimport) ImportDefaultedDefs& operator=(ImportDefaultedDefs&&);
570*0a6a1f1dSLionel Sambuc };
571*0a6a1f1dSLionel Sambuc 
572*0a6a1f1dSLionel Sambuc #ifdef MSABI
573*0a6a1f1dSLionel Sambuc // For MinGW, the function will not be dllimport, and we cannot add the attribute now.
574*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@XZ"(%struct.ImportDefaultedDefs* returned)
575*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@XZ"(%struct.ImportDefaultedDefs* returned)
576*0a6a1f1dSLionel Sambuc __declspec(dllimport) ImportDefaultedDefs::ImportDefaultedDefs() = default;
577*0a6a1f1dSLionel Sambuc #endif
578*0a6a1f1dSLionel Sambuc 
579*0a6a1f1dSLionel Sambuc #ifdef MSABI
580*0a6a1f1dSLionel Sambuc // For MinGW, the function will not be dllimport, and we cannot add the attribute now.
581*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??1ImportDefaultedDefs@@QAE@XZ"(%struct.ImportDefaultedDefs*)
582*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??1ImportDefaultedDefs@@QEAA@XZ"(%struct.ImportDefaultedDefs*)
583*0a6a1f1dSLionel Sambuc __declspec(dllimport) ImportDefaultedDefs::~ImportDefaultedDefs() = default;
584*0a6a1f1dSLionel Sambuc #endif
585*0a6a1f1dSLionel Sambuc 
586*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@ABU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
587*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                  %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@AEBU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
588*0a6a1f1dSLionel Sambuc // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
589*0a6a1f1dSLionel Sambuc // G64-DAG: define linkonce_odr                void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
590*0a6a1f1dSLionel Sambuc inline ImportDefaultedDefs::ImportDefaultedDefs(const ImportDefaultedDefs&) = default;
591*0a6a1f1dSLionel Sambuc 
592*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport   x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0@ABU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
593*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                  dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
594*0a6a1f1dSLionel Sambuc // G32-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
595*0a6a1f1dSLionel Sambuc // G64-DAG: define linkonce_odr                dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
596*0a6a1f1dSLionel Sambuc inline ImportDefaultedDefs& ImportDefaultedDefs::operator=(const ImportDefaultedDefs&) = default;
597*0a6a1f1dSLionel Sambuc 
598*0a6a1f1dSLionel Sambuc // M32-DAG: define x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
599*0a6a1f1dSLionel Sambuc // M64-DAG: define                %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
600*0a6a1f1dSLionel Sambuc // G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
601*0a6a1f1dSLionel Sambuc // G64-DAG: define                void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
602*0a6a1f1dSLionel Sambuc // G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
603*0a6a1f1dSLionel Sambuc // G64-DAG: define                void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
604*0a6a1f1dSLionel Sambuc ImportDefaultedDefs::ImportDefaultedDefs(ImportDefaultedDefs&&) = default; // dllimport ignored
605*0a6a1f1dSLionel Sambuc 
606*0a6a1f1dSLionel Sambuc // M32-DAG: define x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
607*0a6a1f1dSLionel Sambuc // M64-DAG: define                dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
608*0a6a1f1dSLionel Sambuc // G32-DAG: define x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
609*0a6a1f1dSLionel Sambuc // G64-DAG: define                dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
610*0a6a1f1dSLionel Sambuc ImportDefaultedDefs& ImportDefaultedDefs::operator=(ImportDefaultedDefs&&) = default; // dllimport ignored
611*0a6a1f1dSLionel Sambuc 
612*0a6a1f1dSLionel Sambuc USESPECIALS(ImportDefaultedDefs)
613*0a6a1f1dSLionel Sambuc 
614*0a6a1f1dSLionel Sambuc 
615*0a6a1f1dSLionel Sambuc // Import allocation functions.
616*0a6a1f1dSLionel Sambuc struct ImportAlloc {
617*0a6a1f1dSLionel Sambuc   __declspec(dllimport) void* operator new(__SIZE_TYPE__);
618*0a6a1f1dSLionel Sambuc   __declspec(dllimport) void* operator new[](__SIZE_TYPE__);
619*0a6a1f1dSLionel Sambuc   __declspec(dllimport) void operator delete(void*);
620*0a6a1f1dSLionel Sambuc   __declspec(dllimport) void operator delete[](void*);
621*0a6a1f1dSLionel Sambuc };
622*0a6a1f1dSLionel Sambuc 
623*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport i8* @"\01??2ImportAlloc@@SAPAXI@Z"(i32)
624*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport i8* @"\01??2ImportAlloc@@SAPEAX_K@Z"(i64)
625*0a6a1f1dSLionel Sambuc // G32-DAG: declare dllimport i8* @_ZN11ImportAllocnwEj(i32)
626*0a6a1f1dSLionel Sambuc // G64-DAG: declare dllimport i8* @_ZN11ImportAllocnwEy(i64)
UNIQ(use)627*0a6a1f1dSLionel Sambuc void UNIQ(use)() { new ImportAlloc(); }
628*0a6a1f1dSLionel Sambuc 
629*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport i8* @"\01??_UImportAlloc@@SAPAXI@Z"(i32)
630*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport i8* @"\01??_UImportAlloc@@SAPEAX_K@Z"(i64)
631*0a6a1f1dSLionel Sambuc // G32-DAG: declare dllimport i8* @_ZN11ImportAllocnaEj(i32)
632*0a6a1f1dSLionel Sambuc // G64-DAG: declare dllimport i8* @_ZN11ImportAllocnaEy(i64)
UNIQ(use)633*0a6a1f1dSLionel Sambuc void UNIQ(use)() { new ImportAlloc[1]; }
634*0a6a1f1dSLionel Sambuc 
635*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport void @"\01??3ImportAlloc@@SAXPAX@Z"(i8*)
636*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport void @"\01??3ImportAlloc@@SAXPEAX@Z"(i8*)
637*0a6a1f1dSLionel Sambuc // G32-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(i8*)
638*0a6a1f1dSLionel Sambuc // G64-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(i8*)
UNIQ(use)639*0a6a1f1dSLionel Sambuc void UNIQ(use)(ImportAlloc* ptr) { delete ptr; }
640*0a6a1f1dSLionel Sambuc 
641*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport void @"\01??_VImportAlloc@@SAXPAX@Z"(i8*)
642*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport void @"\01??_VImportAlloc@@SAXPEAX@Z"(i8*)
643*0a6a1f1dSLionel Sambuc // G32-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(i8*)
644*0a6a1f1dSLionel Sambuc // G64-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(i8*)
UNIQ(use)645*0a6a1f1dSLionel Sambuc void UNIQ(use)(ImportAlloc* ptr) { delete[] ptr; }
646*0a6a1f1dSLionel Sambuc 
647*0a6a1f1dSLionel Sambuc 
648*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
649*0a6a1f1dSLionel Sambuc // Class member templates
650*0a6a1f1dSLionel Sambuc //===----------------------------------------------------------------------===//
651*0a6a1f1dSLionel Sambuc 
652*0a6a1f1dSLionel Sambuc struct MemFunTmpl {
normalDefMemFunTmpl653*0a6a1f1dSLionel Sambuc   template<typename T>                              void normalDef() {}
importedNormalMemFunTmpl654*0a6a1f1dSLionel Sambuc   template<typename T> __declspec(dllimport)        void importedNormal() {}
staticDefMemFunTmpl655*0a6a1f1dSLionel Sambuc   template<typename T>                       static void staticDef() {}
importedStaticMemFunTmpl656*0a6a1f1dSLionel Sambuc   template<typename T> __declspec(dllimport) static void importedStatic() {}
657*0a6a1f1dSLionel Sambuc };
658*0a6a1f1dSLionel Sambuc 
659*0a6a1f1dSLionel Sambuc // Import implicit instantiation of an imported member function template.
660*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport   x86_thiscallcc void @"\01??$importedNormal@UImplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
661*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                  void @"\01??$importedNormal@UImplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
662*0a6a1f1dSLionel Sambuc // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(%struct.MemFunTmpl* %this)
663*0a6a1f1dSLionel Sambuc // G64-DAG: define linkonce_odr                void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(%struct.MemFunTmpl* %this)
664*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, importedNormal<ImplicitInst_Imported>)
665*0a6a1f1dSLionel Sambuc 
666*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$importedStatic@UImplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
667*0a6a1f1dSLionel Sambuc // GNU-DAG: define linkonce_odr              void @_ZN10MemFunTmpl14importedStaticI21ImplicitInst_ImportedEEvv()
668*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::importedStatic<ImplicitInst_Imported>)
669*0a6a1f1dSLionel Sambuc 
670*0a6a1f1dSLionel Sambuc 
671*0a6a1f1dSLionel Sambuc // Import explicit instantiation declaration of an imported member function
672*0a6a1f1dSLionel Sambuc // template.
673*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
674*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??$importedNormal@UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
675*0a6a1f1dSLionel Sambuc // G32-DAG: declare x86_thiscallcc           void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
676*0a6a1f1dSLionel Sambuc // G64-DAG: declare                          void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
677*0a6a1f1dSLionel Sambuc extern template void MemFunTmpl::importedNormal<ExplicitDecl_Imported>();
678*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, importedNormal<ExplicitDecl_Imported>)
679*0a6a1f1dSLionel Sambuc 
680*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$importedStatic@UExplicitDecl_Imported@@@MemFunTmpl@@SAXXZ"()
681*0a6a1f1dSLionel Sambuc // GNU-DAG: declare                          void @_ZN10MemFunTmpl14importedStaticI21ExplicitDecl_ImportedEEvv()
682*0a6a1f1dSLionel Sambuc extern template void MemFunTmpl::importedStatic<ExplicitDecl_Imported>();
683*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::importedStatic<ExplicitDecl_Imported>)
684*0a6a1f1dSLionel Sambuc 
685*0a6a1f1dSLionel Sambuc 
686*0a6a1f1dSLionel Sambuc // Import explicit instantiation definition of an imported member function
687*0a6a1f1dSLionel Sambuc // template.
688*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
689*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??$importedNormal@UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
690*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr x86_thiscallcc   void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* %this)
691*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr                  void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* %this)
692*0a6a1f1dSLionel Sambuc template void MemFunTmpl::importedNormal<ExplicitInst_Imported>();
693*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, importedNormal<ExplicitInst_Imported>)
694*0a6a1f1dSLionel Sambuc 
695*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$importedStatic@UExplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
696*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr                  void @_ZN10MemFunTmpl14importedStaticI21ExplicitInst_ImportedEEvv()
697*0a6a1f1dSLionel Sambuc template void MemFunTmpl::importedStatic<ExplicitInst_Imported>();
698*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::importedStatic<ExplicitInst_Imported>)
699*0a6a1f1dSLionel Sambuc 
700*0a6a1f1dSLionel Sambuc 
701*0a6a1f1dSLionel Sambuc // Import specialization of an imported member function template.
702*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
703*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??$importedNormal@UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
704*0a6a1f1dSLionel Sambuc // G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
705*0a6a1f1dSLionel Sambuc // G64-DAG: declare dllimport                void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
706*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Imported>();
USEMF(MemFunTmpl,importedNormal<ExplicitSpec_Imported>)707*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, importedNormal<ExplicitSpec_Imported>)
708*0a6a1f1dSLionel Sambuc 
709*0a6a1f1dSLionel Sambuc // M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
710*0a6a1f1dSLionel Sambuc // M64-DAG-FIXME: declare dllimport                void @"\01??$importedNormal@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
711*0a6a1f1dSLionel Sambuc #ifdef MSABI
712*0a6a1f1dSLionel Sambuc //template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Def_Imported>() {}
713*0a6a1f1dSLionel Sambuc //USEMF(MemFunTmpl, importedNormal<ExplicitSpec_Def_Imported>)
714*0a6a1f1dSLionel Sambuc #endif
715*0a6a1f1dSLionel Sambuc 
716*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport   x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
717*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                  void @"\01??$importedNormal@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
718*0a6a1f1dSLionel Sambuc // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* %this)
719*0a6a1f1dSLionel Sambuc // G64-DAG: define linkonce_odr                void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* %this)
720*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) inline void MemFunTmpl::importedNormal<ExplicitSpec_InlineDef_Imported>() {}
721*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, importedNormal<ExplicitSpec_InlineDef_Imported>)
722*0a6a1f1dSLionel Sambuc 
723*0a6a1f1dSLionel Sambuc 
724*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$importedStatic@UExplicitSpec_Imported@@@MemFunTmpl@@SAXXZ"()
725*0a6a1f1dSLionel Sambuc // GNU-DAG: declare dllimport                void @_ZN10MemFunTmpl14importedStaticI21ExplicitSpec_ImportedEEvv()
726*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) void MemFunTmpl::importedStatic<ExplicitSpec_Imported>();
USE(MemFunTmpl::importedStatic<ExplicitSpec_Imported>)727*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::importedStatic<ExplicitSpec_Imported>)
728*0a6a1f1dSLionel Sambuc 
729*0a6a1f1dSLionel Sambuc // MSC-DAG-FIXME: declare dllimport                void @"\01??$importedStatic@UExplicitSpec_Def_Imported@@@MemFunTmpl@@SAXXZ"()
730*0a6a1f1dSLionel Sambuc #ifdef MSABI
731*0a6a1f1dSLionel Sambuc //template<> __declspec(dllimport) void MemFunTmpl::importedStatic<ExplicitSpec_Def_Imported>() {}
732*0a6a1f1dSLionel Sambuc //USE(MemFunTmpl::importedStatic<ExplicitSpec_Def_Imported>)
733*0a6a1f1dSLionel Sambuc #endif
734*0a6a1f1dSLionel Sambuc 
735*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$importedStatic@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@SAXXZ"()
736*0a6a1f1dSLionel Sambuc // GNU-DAG: define linkonce_odr              void @_ZN10MemFunTmpl14importedStaticI31ExplicitSpec_InlineDef_ImportedEEvv()
737*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) inline void MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>() {}
USE(MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>)738*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>)
739*0a6a1f1dSLionel Sambuc 
740*0a6a1f1dSLionel Sambuc 
741*0a6a1f1dSLionel Sambuc // Not importing specialization of an imported member function template without
742*0a6a1f1dSLionel Sambuc // explicit dllimport.
743*0a6a1f1dSLionel Sambuc // M32-DAG: define x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_NotImported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
744*0a6a1f1dSLionel Sambuc // M64-DAG: define                void @"\01??$importedNormal@UExplicitSpec_NotImported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
745*0a6a1f1dSLionel Sambuc // G32-DAG: define x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(%struct.MemFunTmpl* %this)
746*0a6a1f1dSLionel Sambuc // G64-DAG: define                void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(%struct.MemFunTmpl* %this)
747*0a6a1f1dSLionel Sambuc template<> void MemFunTmpl::importedNormal<ExplicitSpec_NotImported>() {}
USEMF(MemFunTmpl,importedNormal<ExplicitSpec_NotImported>)748*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, importedNormal<ExplicitSpec_NotImported>)
749*0a6a1f1dSLionel Sambuc 
750*0a6a1f1dSLionel Sambuc // MSC-DAG: define                void @"\01??$importedStatic@UExplicitSpec_NotImported@@@MemFunTmpl@@SAXXZ"()
751*0a6a1f1dSLionel Sambuc // GNU-DAG: define                void @_ZN10MemFunTmpl14importedStaticI24ExplicitSpec_NotImportedEEvv()
752*0a6a1f1dSLionel Sambuc template<> void MemFunTmpl::importedStatic<ExplicitSpec_NotImported>() {}
753*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::importedStatic<ExplicitSpec_NotImported>)
754*0a6a1f1dSLionel Sambuc 
755*0a6a1f1dSLionel Sambuc 
756*0a6a1f1dSLionel Sambuc // Import explicit instantiation declaration of a non-imported member function
757*0a6a1f1dSLionel Sambuc // template.
758*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
759*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??$normalDef@UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
760*0a6a1f1dSLionel Sambuc // G32-DAG: declare x86_thiscallcc           void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
761*0a6a1f1dSLionel Sambuc // G64-DAG: declare                          void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
762*0a6a1f1dSLionel Sambuc extern template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitDecl_Imported>();
763*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, normalDef<ExplicitDecl_Imported>)
764*0a6a1f1dSLionel Sambuc 
765*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$staticDef@UExplicitDecl_Imported@@@MemFunTmpl@@SAXXZ"()
766*0a6a1f1dSLionel Sambuc // GNU-DAG: declare                          void @_ZN10MemFunTmpl9staticDefI21ExplicitDecl_ImportedEEvv()
767*0a6a1f1dSLionel Sambuc extern template __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitDecl_Imported>();
768*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::staticDef<ExplicitDecl_Imported>)
769*0a6a1f1dSLionel Sambuc 
770*0a6a1f1dSLionel Sambuc 
771*0a6a1f1dSLionel Sambuc // Import explicit instantiation definition of a non-imported member function
772*0a6a1f1dSLionel Sambuc // template.
773*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
774*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??$normalDef@UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
775*0a6a1f1dSLionel Sambuc // G32-DAG: define weak_odr x86_thiscallcc   void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* %this)
776*0a6a1f1dSLionel Sambuc // G64-DAG: define weak_odr                  void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* %this)
777*0a6a1f1dSLionel Sambuc template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitInst_Imported>();
778*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, normalDef<ExplicitInst_Imported>)
779*0a6a1f1dSLionel Sambuc 
780*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport                void @"\01??$staticDef@UExplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
781*0a6a1f1dSLionel Sambuc // GNU-DAG: define weak_odr                  void @_ZN10MemFunTmpl9staticDefI21ExplicitInst_ImportedEEvv()
782*0a6a1f1dSLionel Sambuc template __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitInst_Imported>();
783*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::staticDef<ExplicitInst_Imported>)
784*0a6a1f1dSLionel Sambuc 
785*0a6a1f1dSLionel Sambuc 
786*0a6a1f1dSLionel Sambuc // Import specialization of a non-imported member function template.
787*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
788*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                void @"\01??$normalDef@UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
789*0a6a1f1dSLionel Sambuc // G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
790*0a6a1f1dSLionel Sambuc // G64-DAG: declare dllimport                void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
791*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Imported>();
USEMF(MemFunTmpl,normalDef<ExplicitSpec_Imported>)792*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, normalDef<ExplicitSpec_Imported>)
793*0a6a1f1dSLionel Sambuc 
794*0a6a1f1dSLionel Sambuc // M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
795*0a6a1f1dSLionel Sambuc // M64-DAG-FIXME: declare dllimport                void @"\01??$normalDef@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
796*0a6a1f1dSLionel Sambuc #ifdef MSABI
797*0a6a1f1dSLionel Sambuc //template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Imported>() {}
798*0a6a1f1dSLionel Sambuc //USEMF(MemFunTmpl, normalDef<ExplicitSpec_Def_Imported>)
799*0a6a1f1dSLionel Sambuc #endif
800*0a6a1f1dSLionel Sambuc 
801*0a6a1f1dSLionel Sambuc // M32-DAG: declare dllimport   x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
802*0a6a1f1dSLionel Sambuc // M64-DAG: declare dllimport                  void @"\01??$normalDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
803*0a6a1f1dSLionel Sambuc // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* %this)
804*0a6a1f1dSLionel Sambuc // G64-DAG: define linkonce_odr                void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* %this)
805*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Imported>() {}
806*0a6a1f1dSLionel Sambuc USEMF(MemFunTmpl, normalDef<ExplicitSpec_InlineDef_Imported>)
807*0a6a1f1dSLionel Sambuc 
808*0a6a1f1dSLionel Sambuc 
809*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport void @"\01??$staticDef@UExplicitSpec_Imported@@@MemFunTmpl@@SAXXZ"()
810*0a6a1f1dSLionel Sambuc // GNU-DAG: declare dllimport void @_ZN10MemFunTmpl9staticDefI21ExplicitSpec_ImportedEEvv()
811*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitSpec_Imported>();
USE(MemFunTmpl::staticDef<ExplicitSpec_Imported>)812*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::staticDef<ExplicitSpec_Imported>)
813*0a6a1f1dSLionel Sambuc 
814*0a6a1f1dSLionel Sambuc // MSC-DAG-FIXME: declare dllimport void @"\01??$staticDef@UExplicitSpec_Def_Imported@@@MemFunTmpl@@SAXXZ"()
815*0a6a1f1dSLionel Sambuc #ifdef MSABI
816*0a6a1f1dSLionel Sambuc //template<> __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Imported>() {}
817*0a6a1f1dSLionel Sambuc //USE(MemFunTmpl::staticDef<ExplicitSpec_Def_Imported>)
818*0a6a1f1dSLionel Sambuc #endif
819*0a6a1f1dSLionel Sambuc 
820*0a6a1f1dSLionel Sambuc // MSC-DAG: declare dllimport void @"\01??$staticDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@SAXXZ"()
821*0a6a1f1dSLionel Sambuc // GNU-DAG: define linkonce_odr void @_ZN10MemFunTmpl9staticDefI31ExplicitSpec_InlineDef_ImportedEEvv()
822*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Imported>() {}
823*0a6a1f1dSLionel Sambuc USE(MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Imported>)
824*0a6a1f1dSLionel Sambuc 
825*0a6a1f1dSLionel Sambuc 
826*0a6a1f1dSLionel Sambuc 
827*0a6a1f1dSLionel Sambuc struct MemVarTmpl {
828*0a6a1f1dSLionel Sambuc   template<typename T>                       static const int StaticVar = 1;
829*0a6a1f1dSLionel Sambuc   template<typename T> __declspec(dllimport) static const int ImportedStaticVar = 1;
830*0a6a1f1dSLionel Sambuc };
831*0a6a1f1dSLionel Sambuc 
832*0a6a1f1dSLionel Sambuc // Import implicit instantiation of an imported member variable template.
833*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ImportedStaticVar@UImplicitInst_Imported@@@MemVarTmpl@@2HB" = available_externally dllimport constant i32 1, align 4
834*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI21ImplicitInst_ImportedEE       = external dllimport constant i32
835*0a6a1f1dSLionel Sambuc USEMV(MemVarTmpl, ImportedStaticVar<ImplicitInst_Imported>)
836*0a6a1f1dSLionel Sambuc 
837*0a6a1f1dSLionel Sambuc // Import explicit instantiation declaration of an imported member variable
838*0a6a1f1dSLionel Sambuc // template.
839*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ImportedStaticVar@UExplicitDecl_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
840*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI21ExplicitDecl_ImportedEE       = external dllimport constant i32
841*0a6a1f1dSLionel Sambuc extern template const int MemVarTmpl::ImportedStaticVar<ExplicitDecl_Imported>;
842*0a6a1f1dSLionel Sambuc USEMV(MemVarTmpl, ImportedStaticVar<ExplicitDecl_Imported>)
843*0a6a1f1dSLionel Sambuc 
844*0a6a1f1dSLionel Sambuc // An explicit instantiation definition of an imported member variable template
845*0a6a1f1dSLionel Sambuc // cannot be imported because the template must be defined which is illegal. The
846*0a6a1f1dSLionel Sambuc // in-class initializer does not count.
847*0a6a1f1dSLionel Sambuc 
848*0a6a1f1dSLionel Sambuc // Import specialization of an imported member variable template.
849*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ImportedStaticVar@UExplicitSpec_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
850*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI21ExplicitSpec_ImportedEE       = external dllimport constant i32
851*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_Imported>;
852*0a6a1f1dSLionel Sambuc USEMV(MemVarTmpl, ImportedStaticVar<ExplicitSpec_Imported>)
853*0a6a1f1dSLionel Sambuc 
854*0a6a1f1dSLionel Sambuc // Not importing specialization of a member variable template without explicit
855*0a6a1f1dSLionel Sambuc // dllimport.
856*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$ImportedStaticVar@UExplicitSpec_NotImported@@@MemVarTmpl@@2HB" = external constant i32
857*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI24ExplicitSpec_NotImportedEE       = external constant i32
858*0a6a1f1dSLionel Sambuc template<> const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_NotImported>;
859*0a6a1f1dSLionel Sambuc USEMV(MemVarTmpl, ImportedStaticVar<ExplicitSpec_NotImported>)
860*0a6a1f1dSLionel Sambuc 
861*0a6a1f1dSLionel Sambuc 
862*0a6a1f1dSLionel Sambuc // Import explicit instantiation declaration of a non-imported member variable
863*0a6a1f1dSLionel Sambuc // template.
864*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$StaticVar@UExplicitDecl_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
865*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitDecl_ImportedEE        = external dllimport constant i32
866*0a6a1f1dSLionel Sambuc extern template __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitDecl_Imported>;
867*0a6a1f1dSLionel Sambuc USEMV(MemVarTmpl, StaticVar<ExplicitDecl_Imported>)
868*0a6a1f1dSLionel Sambuc 
869*0a6a1f1dSLionel Sambuc // An explicit instantiation definition of a non-imported member variable template
870*0a6a1f1dSLionel Sambuc // cannot be imported because the template must be defined which is illegal. The
871*0a6a1f1dSLionel Sambuc // in-class initializer does not count.
872*0a6a1f1dSLionel Sambuc 
873*0a6a1f1dSLionel Sambuc // Import specialization of a non-imported member variable template.
874*0a6a1f1dSLionel Sambuc // MSC-DAG: @"\01??$StaticVar@UExplicitSpec_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
875*0a6a1f1dSLionel Sambuc // GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitSpec_ImportedEE        = external dllimport constant i32
876*0a6a1f1dSLionel Sambuc template<> __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitSpec_Imported>;
877*0a6a1f1dSLionel Sambuc USEMV(MemVarTmpl, StaticVar<ExplicitSpec_Imported>)
878