1 // RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o - | FileCheck %s
3 // See microsoft-abi-structors.cpp for constructor codegen tests.
6 // Classic diamond, fully virtual.
8 struct B
: virtual A
{ int b
; };
9 struct C
: virtual A
{ int c
; };
10 struct D
: virtual B
, virtual C
{ int d
; };
11 D d
; // Force vbtable emission.
22 // CHECK-DAG: @"??_8D@Test1@@7B01@@" = linkonce_odr unnamed_addr constant [4 x i32] [i32 0, i32 8, i32 12, i32 20], comdat, align 4
23 // CHECK-DAG: @"??_8D@Test1@@7BB@1@@" = {{.*}} [2 x i32] [i32 0, i32 -4]
24 // CHECK-DAG: @"??_8D@Test1@@7BC@1@@" = {{.*}} [2 x i32] [i32 0, i32 -12]
25 // CHECK-DAG: @"??_8C@Test1@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
26 // CHECK-DAG: @"??_8B@Test1@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
30 // Classic diamond, only A is virtual.
32 struct B
: virtual A
{ int b
; };
33 struct C
: virtual A
{ int c
; };
34 struct D
: B
, C
{ int d
; };
35 D d
; // Force vbtable emission.
45 // CHECK-DAG: @"??_8D@Test2@@7BB@1@@" = {{.*}} [2 x i32] [i32 0, i32 20]
46 // CHECK-DAG: @"??_8D@Test2@@7BC@1@@" = {{.*}} [2 x i32] [i32 0, i32 12]
47 // CHECK-DAG: @"??_8C@Test2@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
48 // CHECK-DAG: @"??_8B@Test2@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
54 struct C
: virtual A
, virtual B
{ int c
; };
57 // CHECK-DAG: @"??_8C@Test3@@7B@" = {{.*}} [3 x i32] [i32 0, i32 8, i32 12]
61 // Test reusing a vbptr from a non-virtual base.
63 struct B
: virtual A
{ int b
; };
64 struct C
: B
, virtual A
{ int c
; };
65 C c
; // Force vbtable emission.
67 // CHECK-DAG: @"??_8C@Test4@@7B@" = {{.*}} [2 x i32] [i32 0, i32 12]
68 // CHECK-DAG: @"??_8B@Test4@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
72 // Test multiple base subobjects of the same type when that type has a virtual
75 struct B
: virtual A
{ int b
; };
76 struct C
: B
{ int c
; };
77 struct D
: B
, C
{ int d
; };
78 D d
; // Force vbtable emission.
80 // CHECK-DAG: @"??_8D@Test5@@7BB@1@@"
81 // CHECK-DAG: @"??_8D@Test5@@7BC@1@@"
82 // CHECK-DAG: @"??_8C@Test5@@7B@"
83 // CHECK-DAG: @"??_8B@Test5@@7B@"
87 // Test that we skip unneeded base path component names.
89 struct B
: virtual A
{ int b
; };
90 struct C
: B
{ int c
; };
91 struct D
: B
, C
{ int d
; };
92 struct E
: D
{ int e
; };
93 struct F
: E
, B
, C
{ int f
; };
94 struct G
: F
, virtual E
{ int g
; };
97 // CHECK-DAG: @"??_8G@Test6@@7BB@1@E@1@F@1@@" =
98 // CHECK-DAG: @"??_8G@Test6@@7BC@1@E@1@F@1@@" =
99 // CHECK-DAG: @"??_8G@Test6@@7BB@1@F@1@@" =
100 // CHECK-DAG: @"??_8G@Test6@@7BC@1@F@1@@" =
101 // CHECK-DAG: @"??_8G@Test6@@7BB@1@E@1@@" =
102 // CHECK-DAG: @"??_8G@Test6@@7BC@1@E@1@@" =
103 // CHECK-DAG: @"??_8F@Test6@@7BB@1@E@1@@" = {{.*}} [2 x i32] [i32 0, i32 52]
104 // CHECK-DAG: @"??_8F@Test6@@7BC@1@E@1@@" = {{.*}} [2 x i32] [i32 0, i32 44]
105 // CHECK-DAG: @"??_8F@Test6@@7BB@1@@" = {{.*}} [2 x i32] [i32 0, i32 24]
106 // CHECK-DAG: @"??_8F@Test6@@7BC@1@@" = {{.*}} [2 x i32] [i32 0, i32 16]
107 // CHECK-DAG: @"??_8C@Test6@@7B@" = {{.*}} [2 x i32] [i32 0, i32 12]
108 // CHECK-DAG: @"??_8B@Test6@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
109 // CHECK-DAG: @"??_8E@Test6@@7BB@1@@" = {{.*}} [2 x i32] [i32 0, i32 28]
110 // CHECK-DAG: @"??_8E@Test6@@7BC@1@@" = {{.*}} [2 x i32] [i32 0, i32 20]
111 // CHECK-DAG: @"??_8D@Test6@@7BB@1@@" = {{.*}} [2 x i32] [i32 0, i32 24]
112 // CHECK-DAG: @"??_8D@Test6@@7BC@1@@" = {{.*}} [2 x i32] [i32 0, i32 16]
116 // Test a non-virtual base which reuses the vbptr of another base.
120 struct D
: virtual A
{ int d
; };
121 struct E
: B
, D
, virtual A
, virtual C
{ int e
; };
124 // CHECK-DAG: @"??_8E@Test7@@7B@" = {{.*}} [3 x i32] [i32 0, i32 12, i32 16]
125 // CHECK-DAG: @"??_8D@Test7@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
129 // Test a virtual base which reuses the vbptr of another base.
131 struct B
: virtual A
{ int b
; };
132 struct C
: B
{ int c
; };
133 struct D
: virtual C
{ int d
; };
136 // CHECK-DAG: @"??_8D@Test8@@7B01@@" = {{.*}} [3 x i32] [i32 0, i32 8, i32 12]
137 // CHECK-DAG: @"??_8D@Test8@@7BC@1@@" = {{.*}} [2 x i32] [i32 0, i32 -4]
138 // CHECK-DAG: @"??_8C@Test8@@7B@" = {{.*}} [2 x i32] [i32 0, i32 12]
139 // CHECK-DAG: @"??_8B@Test8@@7B@" = {{.*}} [2 x i32] [i32 0, i32 8]
143 // D has to add to B's vbtable because D has more morally virtual bases than B.
144 // D then takes B's vbptr and the vbtable is named for D, not B.
146 struct B
: virtual A
{ int b
; };
147 struct C
: virtual B
{ int c
; };
148 struct BB
: B
{ int bb
; }; // Indirection =/
149 struct D
: BB
, C
{ int d
; };
150 struct E
: virtual D
{ };
153 // CHECK-DAG: @"??_8E@Test9@@7B01@@" =
154 // CHECK-DAG: @"??_8E@Test9@@7BD@1@@" =
155 // CHECK-DAG: @"??_8E@Test9@@7BC@1@@" =
156 // CHECK-DAG: @"??_8E@Test9@@7BB@1@@" =
157 // CHECK-DAG: @"??_8D@Test9@@7B@" =
158 // CHECK-DAG: @"??_8D@Test9@@7BC@1@@" =
159 // CHECK-DAG: @"??_8D@Test9@@7BB@1@@" =
160 // CHECK-DAG: @"??_8C@Test9@@7B01@@" =
161 // CHECK-DAG: @"??_8C@Test9@@7BB@1@@" =
162 // CHECK-DAG: @"??_8BB@Test9@@7B@" =
163 // CHECK-DAG: @"??_8B@Test9@@7B@" =
169 struct C
: virtual A
{ int c
; };
170 struct D
: B
, C
{ int d
; };
173 // CHECK-DAG: @"??_8D@Test10@@7B@" =
174 // CHECK-DAG: @"??_8C@Test10@@7B@" =
179 // Typical diamond with an extra single inheritance indirection for B and C.
181 struct B
: virtual A
{ int b
; };
182 struct C
: virtual A
{ int c
; };
183 struct D
: B
{ int d
; };
184 struct E
: C
{ int e
; };
185 struct F
: D
, E
{ int f
; };
188 // CHECK-DAG: @"??_8F@Test11@@7BD@1@@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 28]
189 // CHECK-DAG: @"??_8F@Test11@@7BE@1@@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 16]
190 // CHECK-DAG: @"??_8E@Test11@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 12]
191 // CHECK-DAG: @"??_8C@Test11@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
192 // CHECK-DAG: @"??_8D@Test11@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 12]
193 // CHECK-DAG: @"??_8B@Test11@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
198 // Another vbptr inside a virtual base.
200 struct B
: virtual A
{ int b
; };
201 struct C
: virtual B
{ int c
; };
202 struct D
: C
, B
{ int d
; };
203 struct E
: D
, C
, B
{ int e
; };
206 // CHECK-DAG: @"??_8E@Test12@@7BC@1@D@1@@" =
207 // CHECK-DAG: @"??_8E@Test12@@7BB@1@D@1@@" =
208 // CHECK-DAG: @"??_8E@Test12@@7BD@1@@" =
209 // CHECK-DAG: @"??_8E@Test12@@7BC@1@@" =
210 // CHECK-DAG: @"??_8E@Test12@@7BB@1@@" =
211 // CHECK-DAG: @"??_8C@Test12@@7B01@@" =
212 // CHECK-DAG: @"??_8C@Test12@@7BB@1@@" =
213 // CHECK-DAG: @"??_8D@Test12@@7BC@1@@" =
214 // CHECK-DAG: @"??_8D@Test12@@7BB@1@@" =
215 // CHECK-DAG: @"??_8D@Test12@@7B@" =
216 // CHECK-DAG: @"??_8B@Test12@@7B@" =
221 struct B
: virtual A
{ int b
; };
222 struct C
: virtual B
{ int c
; };
223 struct D
: virtual C
{ int d
; };
224 struct E
: D
, C
, B
{ int e
; };
227 // CHECK-DAG: @"??_8E@Test13@@7BD@1@@" =
228 // CHECK-DAG: @"??_8E@Test13@@7BC@1@D@1@@" =
229 // CHECK-DAG: @"??_8E@Test13@@7BB@1@D@1@@" =
230 // CHECK-DAG: @"??_8E@Test13@@7BC@1@@" =
231 // CHECK-DAG: @"??_8E@Test13@@7BB@1@@" =
232 // CHECK-DAG: @"??_8D@Test13@@7B@" =
233 // CHECK-DAG: @"??_8D@Test13@@7BC@1@@" =
234 // CHECK-DAG: @"??_8D@Test13@@7BB@1@@" =
235 // CHECK-DAG: @"??_8C@Test13@@7B01@@" =
236 // CHECK-DAG: @"??_8C@Test13@@7BB@1@@" =
237 // CHECK-DAG: @"??_8B@Test13@@7B@" =
242 struct B
: virtual A
{ int b
; };
243 struct C
: virtual B
{ int c
; };
244 struct D
: virtual C
{ int d
; };
245 struct E
: D
, virtual C
, virtual B
{ int e
; };
248 // CHECK-DAG: @"??_8E@Test14@@7B@" =
249 // CHECK-DAG: @"??_8E@Test14@@7BC@1@@" =
250 // CHECK-DAG: @"??_8E@Test14@@7BB@1@@" =
251 // CHECK-DAG: @"??_8D@Test14@@7B@" =
252 // CHECK-DAG: @"??_8D@Test14@@7BC@1@@" =
253 // CHECK-DAG: @"??_8D@Test14@@7BB@1@@" =
254 // CHECK-DAG: @"??_8C@Test14@@7B01@@" =
255 // CHECK-DAG: @"??_8C@Test14@@7BB@1@@" =
256 // CHECK-DAG: @"??_8B@Test14@@7B@" =
261 struct B
: virtual A
{ int b
; };
262 struct C
: virtual A
{ int c
; };
263 struct D
: virtual B
{ int d
; };
264 struct E
: D
, C
, B
{ int e
; };
267 // CHECK-DAG: @"??_8E@Test15@@7BD@1@@" =
268 // CHECK-DAG: @"??_8E@Test15@@7BB@1@D@1@@" =
269 // CHECK-DAG: @"??_8E@Test15@@7BC@1@@" =
270 // CHECK-DAG: @"??_8E@Test15@@7BB@1@@" =
271 // CHECK-DAG: @"??_8C@Test15@@7B@" =
272 // CHECK-DAG: @"??_8D@Test15@@7B01@@" =
273 // CHECK-DAG: @"??_8D@Test15@@7BB@1@@" =
274 // CHECK-DAG: @"??_8B@Test15@@7B@" =
279 struct B
: virtual A
{ int b
; };
280 struct C
: virtual B
{ int c
; }; // ambig
281 struct D
: virtual C
{ int d
; };
282 struct E
: virtual D
{ int e
; }; // ambig
283 struct F
: E
, D
, C
, B
{ int f
; }; // ambig
286 // CHECK-DAG: @"??_8F@Test16@@7BE@1@@" =
287 // CHECK-DAG: @"??_8F@Test16@@7BD@1@E@1@@" =
288 // CHECK-DAG: @"??_8F@Test16@@7BC@1@E@1@@" =
289 // CHECK-DAG: @"??_8F@Test16@@7BB@1@E@1@@" =
290 // CHECK-DAG: @"??_8F@Test16@@7BD@1@@" =
291 // CHECK-DAG: @"??_8F@Test16@@7BC@1@@" =
292 // CHECK-DAG: @"??_8F@Test16@@7BB@1@@" =
293 // CHECK-DAG: @"??_8E@Test16@@7B01@@" =
294 // CHECK-DAG: @"??_8E@Test16@@7BD@1@@" =
295 // CHECK-DAG: @"??_8E@Test16@@7BC@1@@" =
296 // CHECK-DAG: @"??_8E@Test16@@7BB@1@@" =
297 // CHECK-DAG: @"??_8D@Test16@@7B@" =
298 // CHECK-DAG: @"??_8D@Test16@@7BC@1@@" =
299 // CHECK-DAG: @"??_8D@Test16@@7BB@1@@" =
300 // CHECK-DAG: @"??_8C@Test16@@7B01@@" =
301 // CHECK-DAG: @"??_8C@Test16@@7BB@1@@" =
302 // CHECK-DAG: @"??_8B@Test16@@7B@" =
306 // This test case has an interesting alternating pattern of using "vbtable of B"
307 // and "vbtable of C for C". This may be the key to the underlying algorithm.
309 struct B
: virtual A
{ int b
; };
310 struct C
: virtual B
{ int c
; }; // ambig
311 struct D
: virtual C
{ int d
; };
312 struct E
: virtual D
{ int e
; }; // ambig
313 struct F
: virtual E
{ int f
; };
314 struct G
: virtual F
{ int g
; }; // ambig
315 struct H
: virtual G
{ int h
; };
316 struct I
: virtual H
{ int i
; }; // ambig
317 struct J
: virtual I
{ int j
; };
318 struct K
: virtual J
{ int k
; }; // ambig
321 // CHECK-DAG: @"??_8K@Test17@@7B01@@" =
322 // CHECK-DAG: @"??_8J@Test17@@7B@" =
323 // CHECK-DAG: @"??_8I@Test17@@7B01@@" =
324 // CHECK-DAG: @"??_8H@Test17@@7B@" =
325 // CHECK-DAG: @"??_8G@Test17@@7B01@@" =
326 // CHECK-DAG: @"??_8F@Test17@@7B@" =
327 // CHECK-DAG: @"??_8E@Test17@@7B01@@" =
328 // CHECK-DAG: @"??_8D@Test17@@7B@" =
329 // CHECK-DAG: @"??_8C@Test17@@7B01@@" =
330 // CHECK-DAG: @"??_8B@Test17@@7B@" =
335 struct B
: virtual A
{ int b
; };
336 struct C
: B
{ int c
; };
337 struct D
: C
, B
{ int d
; };
338 struct E
: D
, C
, B
{ int e
; };
341 // CHECK-DAG: @"??_8E@Test18@@7BC@1@D@1@@" =
342 // CHECK-DAG: @"??_8E@Test18@@7BB@1@D@1@@" =
343 // CHECK-DAG: @"??_8E@Test18@@7BC@1@@" =
344 // CHECK-DAG: @"??_8E@Test18@@7BB@1@@" =
345 // CHECK-DAG: @"??_8B@Test18@@7B@" =
346 // CHECK-DAG: @"??_8C@Test18@@7B@" =
347 // CHECK-DAG: @"??_8D@Test18@@7BC@1@@" =
348 // CHECK-DAG: @"??_8D@Test18@@7BB@1@@" =
353 struct B
: virtual A
{ int b
; };
354 struct C
: virtual B
{ int c
; };
355 struct D
: virtual C
, virtual B
{ int d
; };
356 struct E
: virtual D
, virtual C
, virtual B
{ int e
; };
359 // CHECK-DAG: @"??_8E@Test19@@7B01@@" =
360 // CHECK-DAG: @"??_8E@Test19@@7BD@1@@" =
361 // CHECK-DAG: @"??_8E@Test19@@7BC@1@@" =
362 // CHECK-DAG: @"??_8E@Test19@@7BB@1@@" =
363 // CHECK-DAG: @"??_8D@Test19@@7B@" =
364 // CHECK-DAG: @"??_8D@Test19@@7BC@1@@" =
365 // CHECK-DAG: @"??_8D@Test19@@7BB@1@@" =
366 // CHECK-DAG: @"??_8C@Test19@@7B01@@" =
367 // CHECK-DAG: @"??_8C@Test19@@7BB@1@@" =
368 // CHECK-DAG: @"??_8B@Test19@@7B@" =
372 // E has no direct vbases, but it adds to C's vbtable anyway.
375 struct C
: virtual A
{ int c
; };
376 struct D
: virtual B
{ int d
; };
377 struct E
: C
, D
{ int e
; };
380 // CHECK-DAG: @"??_8E@Test20@@7BC@1@@" = linkonce_odr unnamed_addr constant [3 x i32] [i32 0, i32 20, i32 24]
381 // CHECK-DAG: @"??_8E@Test20@@7BD@1@@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 16]
382 // CHECK-DAG: @"??_8D@Test20@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
383 // CHECK-DAG: @"??_8C@Test20@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
388 struct B
: virtual A
{ int b
; };
389 struct C
: B
{ int c
; };
390 struct D
: B
{ int d
; };
391 struct E
: C
, D
{ int e
; };
392 struct F
: virtual E
{ int f
; };
393 struct G
: E
{ int g
; };
394 struct H
: F
, G
{ int h
; };
397 // CHECK-DAG: @"??_8H@Test21@@7B@" =
398 // CHECK-DAG: @"??_8H@Test21@@7BC@1@F@1@@" =
399 // CHECK-DAG: @"??_8H@Test21@@7BD@1@F@1@@" =
400 // CHECK-DAG: @"??_8H@Test21@@7BC@1@G@1@@" =
401 // CHECK-DAG: @"??_8H@Test21@@7BD@1@G@1@@" =
402 // CHECK-DAG: @"??_8G@Test21@@7BC@1@@" =
403 // CHECK-DAG: @"??_8G@Test21@@7BD@1@@" =
404 // CHECK-DAG: @"??_8F@Test21@@7B@" =
405 // CHECK-DAG: @"??_8F@Test21@@7BC@1@@" =
406 // CHECK-DAG: @"??_8F@Test21@@7BD@1@@" =
407 // CHECK-DAG: @"??_8E@Test21@@7BC@1@@" =
408 // CHECK-DAG: @"??_8E@Test21@@7BD@1@@" =
409 // CHECK-DAG: @"??_8D@Test21@@7B@" =
410 // CHECK-DAG: @"??_8B@Test21@@7B@" =
411 // CHECK-DAG: @"??_8C@Test21@@7B@" =
416 struct B
: virtual A
{ int b
; };
418 struct D
: B
, virtual C
{ int d
; };
421 // CHECK-DAG: @"??_8D@Test22@@7B@" = linkonce_odr unnamed_addr constant [3 x i32] [i32 0, i32 12, i32 16]
422 // CHECK-DAG: @"??_8B@Test22@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
427 struct B
: virtual A
{ int b
; };
429 // Note the unusual order of bases. It forces C to be laid out before A.
430 struct D
: virtual C
, B
{ int d
; };
433 // CHECK-DAG: @"??_8D@Test23@@7B@" = linkonce_odr unnamed_addr constant [3 x i32] [i32 0, i32 16, i32 12]
434 // CHECK-DAG: @"??_8B@Test23@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
439 struct B
: virtual A
{ int b
; };
441 struct D
: virtual C
, B
{
442 virtual void f(); // Issues a vfptr, but the vbptr is still shared with B.
447 // CHECK-DAG: @"??_8D@Test24@@7B@" = linkonce_odr unnamed_addr constant [3 x i32] [i32 0, i32 16, i32 12]
448 // CHECK-DAG: @"??_8B@Test24@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 8]
453 struct B
: virtual A
{
454 virtual void f(); // Issues a vfptr.
458 struct D
: virtual C
, B
{ int d
; };
461 // CHECK-DAG: @"??_8D@Test25@@7B@" = linkonce_odr unnamed_addr constant [3 x i32] [i32 -4, i32 16, i32 12]
462 // CHECK-DAG: @"??_8B@Test25@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 -4, i32 8]
469 struct D
: virtual A
{ int d
; };
470 struct E
: virtual B
{
471 virtual void foo(); // Issues a vfptr.
474 struct F
: virtual C
, D
, E
{ int f
; };
476 // F reuses the D's vbptr, even though D is laid out after E.
477 // CHECK-DAG: @"??_8F@Test26@@7BD@1@@" = linkonce_odr unnamed_addr constant [4 x i32] [i32 0, i32 16, i32 12, i32 20]
478 // CHECK-DAG: @"??_8F@Test26@@7BE@1@@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 -4, i32 28]
484 struct B
: virtual A
{};
485 struct C
: virtual B
{};
489 struct G
: F
, D
, C
, B
{};
492 // CHECK-DAG: @"??_8G@Test27@@7BB@1@@" =
493 // CHECK-DAG: @"??_8G@Test27@@7BB@1@F@1@@" =
494 // CHECK-DAG: @"??_8G@Test27@@7BC@1@@" =
495 // CHECK-DAG: @"??_8G@Test27@@7BC@1@D@1@@" =
496 // CHECK-DAG: @"??_8G@Test27@@7BC@1@E@1@@" =
497 // CHECK-DAG: @"??_8G@Test27@@7BC@1@F@1@@" =
498 // CHECK-DAG: @"??_8G@Test27@@7BD@1@@" =
499 // CHECK-DAG: @"??_8G@Test27@@7BF@1@@" =
505 struct B
: virtual A
{};
506 struct C
: virtual B
{};
509 struct F
: virtual E
, virtual D
, virtual C
{};
512 // CHECK-DAG: @"??_8F@Test28@@7B01@@" =
513 // CHECK-DAG: @"??_8F@Test28@@7BB@1@@" =
514 // CHECK-DAG: @"??_8F@Test28@@7BC@1@@" =
515 // CHECK-DAG: @"??_8F@Test28@@7BC@1@D@1@@" =
516 // CHECK-DAG: @"??_8F@Test28@@7BC@1@D@1@E@1@@" =
517 // CHECK-DAG: @"??_8F@Test28@@7BC@1@E@1@@" =
518 // CHECK-DAG: @"??_8F@Test28@@7BD@1@@" =
519 // CHECK-DAG: @"??_8F@Test28@@7BE@1@@" =
524 struct B
: virtual A
{};
525 struct C
: virtual B
{};
529 // CHECK-DAG: @"??_8D@Test29@@7BB@1@@" = linkonce_odr unnamed_addr constant [2 x i32] zeroinitializer
534 template <class> struct B
: virtual A
{
538 extern template class B
<int>;
539 template B
<int>::B();
540 // CHECK-DAG: @"??_8?$B@H@Test30@@7B@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 0, i32 4], comdat