1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
|
// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t-64.s &&
// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -O0 -S %s -o %t-32.s &&
// RUN: FileCheck -check-prefix LP32 -input-file=%t-32.s %s &&
// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -O3 -S %s -o %t-O3-64.s &&
// RUN: FileCheck -check-prefix LPOPT64 --input-file=%t-O3-64.s %s &&
// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -O3 -S %s -o %t-O3-32.s &&
// RUN: FileCheck -check-prefix LPOPT32 -input-file=%t-O3-32.s %s &&
// RUN: true
struct B {
virtual void bar1();
virtual void bar2();
int b;
};
void B::bar1() { }
void B::bar2() { }
struct C {
virtual void bee1();
virtual void bee2();
};
void C::bee1() { }
void C::bee2() { }
struct D {
virtual void boo();
};
void D::boo() { }
struct D1 {
virtual void bar();
virtual void bar2();
virtual void bar3();
virtual void bar4();
virtual void bar5();
void *d1;
};
void D1::bar() { }
class F : virtual public D1, virtual public D {
public:
virtual void foo();
void *f;
};
void F::foo() { }
int j;
void test2() {
F f;
static int sz = (char *)(&f.f) - (char *)(&f);
j = sz;
// FIXME: These should result in a frontend constant a la fold, no run time
// initializer
// CHECK-LPOPT32: movl $4, __ZZ5test2vE2sz
// CHECK-LPOPT64: movl $8, __ZZ5test2vE2sz(%rip)
}
static_assert(sizeof(F) == sizeof(void*)*4, "invalid vbase size");
struct E {
int e;
};
static_assert (sizeof (C) == (sizeof(void *)), "vtable pointer layout");
class A : public E, public B, public C {
public:
virtual void foo1();
virtual void foo2();
A() { }
int a;
} *ap;
void A::foo1() { }
void A::foo2() { }
int main() {
A a;
B b;
ap->e = 1;
ap->b = 2;
}
// CHECK-LP32: main:
// CHECK-LP32: movl $1, 8(%eax)
// CHECK-LP32: movl $2, 4(%eax)
// CHECK-LP64: main:
// CHECK-LP64: movl $1, 12(%rax)
// CHECK-LP64: movl $2, 8(%rax)
struct test12_A {
virtual void foo0() { }
virtual void foo();
} *test12_pa;
struct test12_B : public test12_A {
virtual void foo() { }
} *test12_pb;
struct test12_D : public test12_B {
} *test12_pd;
void test12_foo() {
test12_pa->foo0();
test12_pb->foo0();
test12_pd->foo0();
test12_pa->foo();
test12_pb->foo();
test12_pd->foo();
test12_pa->test12_A::foo();
}
// CHECK-LPOPT32:__Z10test12_foov:
// CHECK-LPOPT32: movl _test12_pa, %eax
// CHECK-LPOPT32-NEXT: movl (%eax), %ecx
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call *(%ecx)
// CHECK-LPOPT32-NEXT: movl _test12_pb, %eax
// CHECK-LPOPT32-NEXT: movl (%eax), %ecx
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call *(%ecx)
// CHECK-LPOPT32-NEXT: movl _test12_pd, %eax
// CHECK-LPOPT32-NEXT: movl (%eax), %ecx
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call *(%ecx)
// CHECK-LPOPT32-NEXT: movl _test12_pa, %eax
// CHECK-LPOPT32-NEXT: movl (%eax), %ecx
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call *4(%ecx)
// CHECK-LPOPT32-NEXT: movl _test12_pb, %eax
// CHECK-LPOPT32-NEXT: movl (%eax), %ecx
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call *4(%ecx)
// CHECK-LPOPT32-NEXT: movl _test12_pd, %eax
// CHECK-LPOPT32-NEXT: movl (%eax), %ecx
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call *4(%ecx)
// CHECK-LPOPT32-NEXT: movl _test12_pa, %eax
// CHECK-LPOPT32-NEXT: movl %eax, (%esp)
// CHECK-LPOPT32-NEXT: call L__ZN8test12_A3fooEv$stub
// CHECK-LPOPT64:__Z10test12_foov:
// CHECK-LPOPT64: movq _test12_pa(%rip), %rdi
// CHECK-LPOPT64-NEXT: movq (%rdi), %rax
// CHECK-LPOPT64-NEXT: call *(%rax)
// CHECK-LPOPT64-NEXT: movq _test12_pb(%rip), %rdi
// CHECK-LPOPT64-NEXT: movq (%rdi), %rax
// CHECK-LPOPT64-NEXT: call *(%rax)
// CHECK-LPOPT64-NEXT: movq _test12_pd(%rip), %rdi
// CHECK-LPOPT64-NEXT: movq (%rdi), %rax
// CHECK-LPOPT64-NEXT: call *(%rax)
// CHECK-LPOPT64-NEXT: movq _test12_pa(%rip), %rdi
// CHECK-LPOPT64-NEXT: movq (%rdi), %rax
// CHECK-LPOPT64-NEXT: call *8(%rax)
// CHECK-LPOPT64-NEXT: movq _test12_pb(%rip), %rdi
// CHECK-LPOPT64-NEXT: movq (%rdi), %rax
// CHECK-LPOPT64-NEXT: call *8(%rax)
// CHECK-LPOPT64-NEXT: movq _test12_pd(%rip), %rdi
// CHECK-LPOPT64-NEXT: movq (%rdi), %rax
// CHECK-LPOPT64-NEXT: call *8(%rax)
// CHECK-LPOPT64-NEXT: movq _test12_pa(%rip), %rdi
// CHECK-LPOPT64-NEXT: call __ZN8test12_A3fooEv
struct test6_B2 { virtual void funcB2(); char b[1000]; };
struct test6_B1 : virtual test6_B2 { virtual void funcB1(); };
struct test6_D : test6_B2, virtual test6_B1 {
};
// CHECK-LP32: .zerofill __DATA, __common, _d6, 2012, 4
// CHECK-LP64: .zerofill __DATA, __common, _d6, 2024, 4
struct test7_B2 { virtual void funcB2(); };
struct test7_B1 : virtual test7_B2 { virtual void funcB1(); };
struct test7_D : test7_B2, virtual test7_B1 {
};
// CHECK-LP32: .zerofill __DATA, __common, _d7, 8, 3
// CHECK-LP64: .zerofill __DATA, __common, _d7, 16, 3
struct test3_B3 { virtual void funcB3(); };
struct test3_B2 : virtual test3_B3 { virtual void funcB2(); };
struct test3_B1 : virtual test3_B2 { virtual void funcB1(); };
struct test3_D : virtual test3_B1 {
virtual void funcD() { }
};
// CHECK-LP32:__ZTV7test3_D:
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI7test3_D
// CHECK-LP32-NEXT: .long __ZN8test3_B36funcB3Ev
// CHECK-LP32-NEXT: .long __ZN8test3_B26funcB2Ev
// CHECK-LP32-NEXT: .long __ZN8test3_B16funcB1Ev
// CHECK-LP32-NEXT: .long __ZN7test3_D5funcDEv
// CHECK-LP64:__ZTV7test3_D:
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI7test3_D
// CHECK-LP64-NEXT: .quad __ZN8test3_B36funcB3Ev
// CHECK-LP64-NEXT: .quad __ZN8test3_B26funcB2Ev
// CHECK-LP64-NEXT: .quad __ZN8test3_B16funcB1Ev
// CHECK-LP64-NEXT: .quad __ZN7test3_D5funcDEv
struct test4_D : virtual B, virtual C {
};
// CHECK-LP32:__ZTV7test4_D:
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI7test4_D
// CHECK-LP32-NEXT: .long __ZN1C4bee1Ev
// CHECK-LP32-NEXT: .long __ZN1C4bee2Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long __ZTI7test4_D
// CHECK-LP32-NEXT: .long __ZN1B4bar1Ev
// CHECK-LP32-NEXT: .long __ZN1B4bar2Ev
// CHECK-LP64:__ZTV7test4_D:
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI7test4_D
// CHECK-LP64-NEXT: .quad __ZN1C4bee1Ev
// CHECK-LP64-NEXT: .quad __ZN1C4bee2Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad __ZTI7test4_D
// CHECK-LP64-NEXT: .quad __ZN1B4bar1Ev
// CHECK-LP64-NEXT: .quad __ZN1B4bar2Ev
struct test5_B3 { virtual void funcB3(); };
struct test5_B2 : virtual test5_B3 { virtual void funcB2(); };
struct test5_B1 : virtual test5_B2 { virtual void funcB1(); };
struct test5_B23 { virtual void funcB23(); };
struct test5_B22 : virtual test5_B23 { virtual void funcB22(); };
struct test5_B21 : virtual test5_B22 { virtual void funcB21(); };
struct B232 { virtual void funcB232(); };
struct B231 { virtual void funcB231(); };
struct test5_B33 { virtual void funcB33(); };
struct test5_B32 : virtual test5_B33, virtual B232 { virtual void funcB32(); };
struct test5_B31 : virtual test5_B32, virtual B231 { virtual void funcB31(); };
struct test5_D : virtual test5_B1, virtual test5_B21, virtual test5_B31 {
virtual void funcD() { }
};
// CHECK-LP32:__ZTV7test5_D:
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI7test5_D
// CHECK-LP32-NEXT: .long __ZN8test5_B36funcB3Ev
// CHECK-LP32-NEXT: .long __ZN8test5_B26funcB2Ev
// CHECK-LP32-NEXT: .long __ZN8test5_B16funcB1Ev
// CHECK-LP32-NEXT: .long __ZN7test5_D5funcDEv
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long __ZTI7test5_D
// CHECK-LP32-NEXT: .long __ZN9test5_B237funcB23Ev
// CHECK-LP32-NEXT: .long __ZN9test5_B227funcB22Ev
// CHECK-LP32-NEXT: .long __ZN9test5_B217funcB21Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32: .long 8
// CHECK-LP32 .space 4
// CHECK-LP32 .space 4 FIXME
// CHECK-LP32: .long 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .long __ZTI7test5_D
// CHECK-LP32-NEXT: .long __ZN9test5_B337funcB33Ev
// CHECK-LP32-NEXT: .long __ZN9test5_B327funcB32Ev
// CHECK-LP32-NEXT: .long __ZN9test5_B317funcB31Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long __ZTI7test5_D
// CHECK-LP32-NEXT: .long __ZN4B2328funcB232Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967280
// CHECK-LP32-NEXT: .long __ZTI7test5_D
// CHECK-LP32-NEXT: .long __ZN4B2318funcB231Ev
// CHECK-LP64:__ZTV7test5_D:
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 24
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI7test5_D
// CHECK-LP64-NEXT: .quad __ZN8test5_B36funcB3Ev
// CHECK-LP64-NEXT: .quad __ZN8test5_B26funcB2Ev
// CHECK-LP64-NEXT: .quad __ZN8test5_B16funcB1Ev
// CHECK-LP64-NEXT: .quad __ZN7test5_D5funcDEv
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad __ZTI7test5_D
// CHECK-LP64-NEXT: .quad __ZN9test5_B237funcB23Ev
// CHECK-LP64-NEXT: .quad __ZN9test5_B227funcB22Ev
// CHECK-LP64-NEXT: .quad __ZN9test5_B217funcB21Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64: .quad 16
// CHECK-LP64 .space 8
// CHECK-LP64 .space 8
// CHECK-LP64: .quad 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad __ZTI7test5_D
// CHECK-LP64-NEXT: .quad __ZN9test5_B337funcB33Ev
// CHECK-LP64-NEXT: .quad __ZN9test5_B327funcB32Ev
// CHECK-LP64-NEXT: .quad __ZN9test5_B317funcB31Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad __ZTI7test5_D
// CHECK-LP64-NEXT: .quad __ZN4B2328funcB232Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551584
// CHECK-LP64-NEXT: .quad __ZTI7test5_D
// CHECK-LP64-NEXT: .quad __ZN4B2318funcB231Ev
struct test8_B1 {
virtual void ftest8_B1() { }
};
struct test8_B2aa {
virtual void ftest8_B2aa() { }
int i;
};
struct test8_B2ab {
virtual void ftest8_B2ab() { }
int i;
};
struct test8_B2a : virtual test8_B2aa, virtual test8_B2ab {
virtual void ftest8_B2a() { }
};
struct test8_B2b {
virtual void ftest8_B2b() { }
};
struct test8_B2 : test8_B2a, test8_B2b {
virtual void ftest8_B2() { }
};
struct test8_B3 {
virtual void ftest8_B3() { }
};
class test8_D : test8_B1, test8_B2, test8_B3 {
};
// CHECK-LP32:__ZTV7test8_D:
// CHECK-LP32-NEXT: .long 24
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI7test8_D
// CHECK-LP32-NEXT: .long __ZN8test8_B19ftest8_B1Ev
// CHECK-LP32-NEXT: .long 20
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long __ZTI7test8_D
// CHECK-LP32-NEXT: .long __ZN9test8_B2a10ftest8_B2aEv
// CHECK-LP32-NEXT: .long __ZN8test8_B29ftest8_B2Ev
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .long __ZTI7test8_D
// CHECK-LP32-NEXT: .long __ZN9test8_B2b10ftest8_B2bEv
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long __ZTI7test8_D
// CHECK-LP32-NEXT: .long __ZN8test8_B39ftest8_B3Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967280
// CHECK-LP32-NEXT: .long __ZTI7test8_D
// CHECK-LP32-NEXT: .long __ZN10test8_B2aa11ftest8_B2aaEv
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967272
// CHECK-LP32-NEXT: .long __ZTI7test8_D
// CHECK-LP32-NEXT: .long __ZN10test8_B2ab11ftest8_B2abEv
// CHECK-LP64:__ZTV7test8_D:
// CHECK-LP64-NEXT: .quad 48
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI7test8_D
// CHECK-LP64-NEXT: .quad __ZN8test8_B19ftest8_B1Ev
// CHECK-LP64-NEXT: .quad 40
// CHECK-LP64-NEXT: .quad 24
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad __ZTI7test8_D
// CHECK-LP64-NEXT: .quad __ZN9test8_B2a10ftest8_B2aEv
// CHECK-LP64-NEXT: .quad __ZN8test8_B29ftest8_B2Ev
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad __ZTI7test8_D
// CHECK-LP64-NEXT: .quad __ZN9test8_B2b10ftest8_B2bEv
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad __ZTI7test8_D
// CHECK-LP64-NEXT: .quad __ZN8test8_B39ftest8_B3Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551584
// CHECK-LP64-NEXT: .quad __ZTI7test8_D
// CHECK-LP64-NEXT: .quad __ZN10test8_B2aa11ftest8_B2aaEv
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551568
// CHECK-LP64-NEXT: .quad __ZTI7test8_D
// CHECK-LP64-NEXT: .quad __ZN10test8_B2ab11ftest8_B2abEv
struct test9_B3 { virtual void funcB3(); int i; };
struct test9_B2 : virtual test9_B3 { virtual void funcB2(); int i; };
struct test9_B1 : virtual test9_B2 { virtual void funcB1(); int i; };
struct test9_B23 { virtual void funcB23(); int i; };
struct test9_B22 : virtual test9_B23 { virtual void funcB22(); int i; };
struct test9_B21 : virtual test9_B22 { virtual void funcB21(); int i; };
struct test9_B232 { virtual void funcB232(); int i; };
struct test9_B231 { virtual void funcB231(); int i; };
struct test9_B33 { virtual void funcB33(); int i; };
struct test9_B32 : virtual test9_B33, virtual test9_B232 { virtual void funcB32(); int i; };
struct test9_B31 : virtual test9_B32, virtual test9_B231 { virtual void funcB31(); int i; };
struct test9_D : virtual test9_B1, virtual test9_B21, virtual test9_B31 {
virtual void funcD() { }
};
// CHECK-LP64: __ZTV7test9_D:
// CHECK-LP64-NEXT: .quad 168
// CHECK-LP64-NEXT: .quad 152
// CHECK-LP64-NEXT: .quad 136
// CHECK-LP64-NEXT: .quad 120
// CHECK-LP64-NEXT: .quad 104
// CHECK-LP64-NEXT: .quad 88
// CHECK-LP64-NEXT: .quad 72
// CHECK-LP64-NEXT: .quad 56
// CHECK-LP64-NEXT: .quad 40
// CHECK-LP64-NEXT: .quad 24
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN7test9_D5funcDEv
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN8test9_B16funcB1Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN8test9_B26funcB2Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551576
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN8test9_B36funcB3Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551560
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN9test9_B217funcB21Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551544
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN9test9_B227funcB22Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551528
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN9test9_B237funcB23Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 64
// CHECK-LP64-NEXT: .quad 48
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551512
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN9test9_B317funcB31Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551496
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN9test9_B327funcB32Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551480
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN9test9_B337funcB33Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551464
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN10test9_B2328funcB232Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551448
// CHECK-LP64-NEXT: .quad __ZTI7test9_D
// CHECK-LP64-NEXT: .quad __ZN10test9_B2318funcB231Ev
// CHECK-LP32: __ZTV7test9_D:
// CHECK-LP32-NEXT: .long 84
// CHECK-LP32-NEXT: .long 76
// CHECK-LP32-NEXT: .long 68
// CHECK-LP32-NEXT: .long 60
// CHECK-LP32-NEXT: .long 52
// CHECK-LP32-NEXT: .long 44
// CHECK-LP32-NEXT: .long 36
// CHECK-LP32-NEXT: .long 28
// CHECK-LP32-NEXT: .long 20
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN7test9_D5funcDEv
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN8test9_B16funcB1Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN8test9_B26funcB2Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967276
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN8test9_B36funcB3Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967268
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN9test9_B217funcB21Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967260
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN9test9_B227funcB22Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967252
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN9test9_B237funcB23Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 32
// CHECK-LP32-NEXT: .long 24
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967244
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN9test9_B317funcB31Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967236
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN9test9_B327funcB32Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967228
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN9test9_B337funcB33Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967220
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN10test9_B2328funcB232Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967212
// CHECK-LP32-NEXT: .long __ZTI7test9_D
// CHECK-LP32-NEXT: .long __ZN10test9_B2318funcB231Ev
struct test10_O { int i; };
struct test10_B1 : virtual test10_O {
virtual void ftest10_B1() { }
};
struct test10_B2aa : virtual test10_O {
int i;
};
struct test10_B2ab : virtual test10_O {
int i;
};
struct test10_B2a : virtual test10_B2aa, virtual test10_B2ab,virtual test10_O {
virtual void ftest10_B2a() { }
};
struct test10_B2b : virtual test10_O {
virtual void ftest10_B2b() { }
};
struct test10_B2 : test10_B2a {
virtual void ftest10_B2() { }
};
class test10_D : test10_B1, test10_B2 {
void ftest10_B2aa() { }
};
// CHECK-LP64:__ZTV8test10_D:
// CHECK-LP64-NEXT: .quad 40
// CHECK-LP64-NEXT: .quad 24
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI8test10_D
// CHECK-LP64-NEXT: .quad __ZN9test10_B110ftest10_B1Ev
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad __ZTI8test10_D
// CHECK-LP64-NEXT: .quad __ZN10test10_B2a11ftest10_B2aEv
// CHECK-LP64-NEXT: .quad __ZN9test10_B210ftest10_B2Ev
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad __ZTI8test10_D
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad 18446744073709551576
// CHECK-LP64-NEXT: .quad __ZTI8test10_D
// CHECK-LP32: __ZTV8test10_D:
// CHECK-LP32-NEXT: .long 20
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI8test10_D
// CHECK-LP32-NEXT: .long __ZN9test10_B110ftest10_B1Ev
// CHECK-LP32-NEXT: .long 16
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long __ZTI8test10_D
// CHECK-LP32-NEXT: .long __ZN10test10_B2a11ftest10_B2aEv
// CHECK-LP32-NEXT: .long __ZN9test10_B210ftest10_B2Ev
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long __ZTI8test10_D
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long 4294967276
// CHECK-LP32-NEXT: .long __ZTI8test10_D
struct test11_B {
virtual void B1() { }
virtual void D() { }
virtual void B2() { }
};
struct test11_D : test11_B {
virtual void D1() { }
virtual void D() { }
virtual void D2() { }
};
// CHECK-LP32:__ZTV8test11_D:
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI8test11_D
// CHECK-LP32-NEXT: .long __ZN8test11_B2B1Ev
// CHECK-LP32-NEXT: .long __ZN8test11_D1DEv
// CHECK-LP32-NEXT: .long __ZN8test11_B2B2Ev
// CHECK-LP32-NEXT: .long __ZN8test11_D2D1Ev
// CHECK-LP32-NEXT: .long __ZN8test11_D2D2Ev
// CHECK-LP64:__ZTV8test11_D:
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI8test11_D
// CHECK-LP64-NEXT: .quad __ZN8test11_B2B1Ev
// CHECK-LP64-NEXT: .quad __ZN8test11_D1DEv
// CHECK-LP64-NEXT: .quad __ZN8test11_B2B2Ev
// CHECK-LP64-NEXT: .quad __ZN8test11_D2D1Ev
// CHECK-LP64-NEXT: .quad __ZN8test11_D2D2Ev
struct test13_B {
virtual void B1() { }
virtual void D() { }
virtual void Da();
virtual void Db() { }
virtual void Dc() { }
virtual void B2() { }
int i;
};
struct test13_NV1 {
virtual void fooNV1() { }
virtual void D() { }
};
struct test13_B2 : /* test13_NV1, */ virtual test13_B {
virtual void B2a() { }
virtual void B2() { }
virtual void D() { }
virtual void Da();
virtual void Dd() { }
virtual void B2b() { }
int i;
};
struct test13_D : test13_NV1, virtual test13_B2 {
virtual void D1() { }
virtual void D() { }
virtual void Db() { }
virtual void Dd() { }
virtual void D2() { }
virtual void fooNV1() { }
};
// CHECK-LP64:__ZTV8test13_D:
// CHECK-LP64-NEXT: .quad 24
// CHECK-LP64-NEXT: .quad 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI8test13_D
// CHECK-LP64-NEXT: .quad __ZN8test13_D6fooNV1Ev
// CHECK-LP64-NEXT: .quad __ZN8test13_D1DEv
// CHECK-LP64-NEXT: .quad __ZN8test13_D2D1Ev
// CHECK-LP64-NEXT: .quad __ZN8test13_D2DbEv
// CHECK-LP64-NEXT: .quad __ZN8test13_D2DdEv
// CHECK-LP64-NEXT: .quad __ZN8test13_D2D2Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551608
// CHECK-LP64-NEXT: .quad __ZTI8test13_D
// CHECK-LP64-NEXT: .quad __ZN9test13_B23B2aEv
// CHECK-LP64-NEXT: .quad __ZN9test13_B22B2Ev
// CHECK-LP64-NEXT: .quad __ZTv0_n48_N8test13_D1DEv
// CHECK-LP64-NEXT: .quad __ZN9test13_B22DaEv
// CHECK-LP64-NEXT: .quad __ZTv0_n64_N8test13_D2DdEv
// CHECK-LP64-NEXT: .quad __ZN9test13_B23B2bEv
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551592
// CHECK-LP64-NEXT: .quad __ZTI8test13_D
// CHECK-LP64-NEXT: .quad __ZN8test13_B2B1Ev
// CHECK-LP64-NEXT: .quad __ZTv0_n32_N8test13_D1DEv
// CHECK-LP64-NEXT: .quad __ZTv0_n40_N9test13_B22DaEv
// CHECK-LP64-NEXT: .quad __ZTv0_n48_N8test13_D2DbEv
// CHECK-LP64-NEXT: .quad __ZN8test13_B2DcEv
// CHECK-LP64-NEXT: .quad __ZTv0_n64_N9test13_B22B2Ev
// CHECK-LP32:__ZTV8test13_D:
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI8test13_D
// CHECK-LP32-NEXT: .long __ZN8test13_D6fooNV1Ev
// CHECK-LP32-NEXT: .long __ZN8test13_D1DEv
// CHECK-LP32-NEXT: .long __ZN8test13_D2D1Ev
// CHECK-LP32-NEXT: .long __ZN8test13_D2DbEv
// CHECK-LP32-NEXT: .long __ZN8test13_D2DdEv
// CHECK-LP32-NEXT: .long __ZN8test13_D2D2Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .long 4294967292
// CHECK-LP32-NEXT: .long __ZTI8test13_D
// CHECK-LP32-NEXT: .long __ZN9test13_B23B2aEv
// CHECK-LP32-NEXT: .long __ZN9test13_B22B2Ev
// CHECK-LP32-NEXT: .long __ZTv0_n24_N8test13_D1DEv
// CHECK-LP32-NEXT: .long __ZN9test13_B22DaEv
// CHECK-LP32-NEXT: .long __ZTv0_n32_N8test13_D2DdEv
// CHECK-LP32-NEXT: .long __ZN9test13_B23B2bEv
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long __ZTI8test13_D
// CHECK-LP32-NEXT: .long __ZN8test13_B2B1Ev
// CHECK-LP32-NEXT: .long __ZTv0_n16_N8test13_D1DEv
// CHECK-LP32-NEXT: .long __ZTv0_n20_N9test13_B22DaEv
// CHECK-LP32-NEXT: .long __ZTv0_n24_N8test13_D2DbEv
// CHECK-LP32-NEXT: .long __ZN8test13_B2DcEv
// CHECK-LP32-NEXT: .long __ZTv0_n32_N9test13_B22B2Ev
class test14 {
public:
virtual void initWithInt(int a);
static test14 *withInt(int a);
};
void test14::initWithInt(int a) { }
test14 *test14::withInt(int a) {
test14 *me = new test14;
me->initWithInt(a);
return me;
}
struct test15_B {
virtual test15_B *foo1() { return 0; }
virtual test15_B *foo2() { return 0; }
virtual test15_B *foo3() { return 0; }
int i;
};
struct test15_NV1 {
virtual void fooNV1() { }
int i;
};
struct test15_B2 : test15_NV1, virtual test15_B {
virtual test15_B2 *foo1() { return 0; }
virtual test15_B2 *foo2() { return 0; }
int i;
};
struct test15_D : test15_NV1, virtual test15_B2 {
virtual test15_D *foo1() { return 0; }
};
// CHECK-LP64:__ZTV8test15_D:
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI8test15_D
// CHECK-LP64-NEXT: .quad __ZN10test15_NV16fooNV1Ev
// CHECK-LP64-NEXT: .quad __ZN8test15_D4foo1Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad __ZTI8test15_D
// CHECK-LP64-NEXT: .quad __ZN10test15_NV16fooNV1Ev
// CHECK-LP64-NEXT: .quad __ZTcv0_n40_v0_n24_N8test15_D4foo1Ev
// CHECK-LP64-NEXT: .quad __ZN9test15_B24foo2Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad 18446744073709551584
// CHECK-LP64-NEXT: .quad 18446744073709551584
// CHECK-LP64-NEXT: .quad __ZTI8test15_D
// CHECK-LP64-NEXT: .quad __ZTcv0_n24_v0_n32_N8test15_D4foo1Ev
// CHECK-LP64-NEXT: .quad __ZTcv0_n32_v0_n24_N9test15_B24foo2Ev
// CHECK-LP64-NEXT: .quad __ZN8test15_B4foo3Ev
// CHECK-LP32:__ZTV8test15_D:
// CHECK-LP32-NEXT: .long 20
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI8test15_D
// CHECK-LP32-NEXT: .long __ZN10test15_NV16fooNV1Ev
// CHECK-LP32-NEXT: .long __ZN8test15_D4foo1Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .long __ZTI8test15_D
// CHECK-LP32-NEXT: .long __ZN10test15_NV16fooNV1Ev
// CHECK-LP32-NEXT: .long __ZTcv0_n20_v0_n12_N8test15_D4foo1Ev
// CHECK-LP32-NEXT: .long __ZN9test15_B24foo2Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long 4294967276
// CHECK-LP32-NEXT: .long 4294967276
// CHECK-LP32-NEXT: .long __ZTI8test15_D
// CHECK-LP32-NEXT: .long __ZTcv0_n12_v0_n16_N8test15_D4foo1Ev
// CHECK-LP32-NEXT: .long __ZTcv0_n16_v0_n12_N9test15_B24foo2Ev
// CHECK-LP32-NEXT: .long __ZN8test15_B4foo3Ev
struct test16_NV1 {
virtual void fooNV1() { }
virtual void foo_NV1() { }
int i;
};
struct test16_NV2 {
virtual test16_NV2* foo1() { return 0; }
virtual void foo_NV2() { }
virtual void foo_NV2b() { }
int i;
};
struct test16_B : public test16_NV1, test16_NV2 {
virtual test16_B *foo1() { return 0; }
virtual test16_B *foo2() { return 0; }
virtual test16_B *foo3() { return 0; }
virtual void foo_B() { }
int i;
};
struct test16_B2 : test16_NV1, virtual test16_B {
virtual test16_B2 *foo1() { return 0; }
virtual test16_B2 *foo2() { return 0; }
virtual void foo_B2() { }
int i;
};
struct test16_D : test16_NV1, virtual test16_B2 {
virtual test16_D *foo1() { return 0; }
};
// CHECK-LP64: __ZTV8test16_D:
// CHECK-LP64-NEXT: .quad 32
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI8test16_D
// CHECK-LP64-NEXT: .quad __ZN10test16_NV16fooNV1Ev
// CHECK-LP64-NEXT: .quad __ZN10test16_NV17foo_NV1Ev
// CHECK-LP64-NEXT: .quad __ZN8test16_D4foo1Ev
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad __ZTI8test16_D
// CHECK-LP64-NEXT: .quad __ZN10test16_NV16fooNV1Ev
// CHECK-LP64-NEXT: .quad __ZN10test16_NV17foo_NV1Ev
// CHECK-LP64-NEXT: .quad __ZTcv0_n48_v0_n24_N8test16_D4foo1Ev
// CHECK-LP64-NEXT: .quad __ZN9test16_B24foo2Ev
// CHECK-LP64-NEXT: .quad __ZN9test16_B26foo_B2Ev
// CHECK-LP64-NEXT .quad 16
// CHECK-LP64-NEXT .quad 16
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64: .quad 18446744073709551600
// CHECK-LP64: .quad 18446744073709551584
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551584
// CHECK-LP64-NEXT: .quad __ZTI8test16_D
// CHECK-LP64-NEXT: .quad __ZN10test16_NV16fooNV1Ev
// CHECK-LP64-NEXT: .quad __ZN10test16_NV17foo_NV1Ev
// CHECK-LP64-NEXT: .quad __ZTcv0_n40_v0_n32_N8test16_D4foo1Ev
// CHECK-LP64-NEXT: .quad __ZTcv0_n48_v0_n24_N9test16_B24foo2Ev
// CHECK-LP64-NEXT: .quad __ZN8test16_B4foo3Ev
// CHECK-LP64-NEXT: .quad __ZN8test16_B5foo_BEv
// CHECK-LP64-NEXT: .quad 18446744073709551568
// CHECK-LP64-NEXT: .quad __ZTI8test16_D
// CHECK-LP64-NEXT .quad __ZTcvn16_n40_v16_n32_N8test16_D4foo1Ev
// CHECK-LP64: .quad __ZN10test16_NV27foo_NV2Ev
// CHECK-LP64-NEXT: .quad __ZN10test16_NV28foo_NV2bEv
// CHECK-LP32: __ZTV8test16_D:
// CHECK-LP32-NEXT: .long 20
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI8test16_D
// CHECK-LP32-NEXT: .long __ZN10test16_NV16fooNV1Ev
// CHECK-LP32-NEXT: .long __ZN10test16_NV17foo_NV1Ev
// CHECK-LP32-NEXT: .long __ZN8test16_D4foo1Ev
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 12
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .long __ZTI8test16_D
// CHECK-LP32-NEXT: .long __ZN10test16_NV16fooNV1Ev
// CHECK-LP32-NEXT: .long __ZN10test16_NV17foo_NV1Ev
// CHECK-LP32-NEXT: .long __ZTcv0_n24_v0_n12_N8test16_D4foo1Ev
// CHECK-LP32-NEXT: .long __ZN9test16_B24foo2Ev
// CHECK-LP32-NEXT: .long __ZN9test16_B26foo_B2Ev
// CHECK-LP32-NEXT .long 8
// CHECK-LP32-NEXT .long 8
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32: .long 4294967284
// CHECK-LP32-NEXT: .long 4294967276
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967276
// CHECK-LP32-NEXT: .long __ZTI8test16_D
// CHECK-LP32-NEXT: .long __ZN10test16_NV16fooNV1Ev
// CHECK-LP32-NEXT: .long __ZN10test16_NV17foo_NV1Ev
// CHECK-LP32-NEXT: .long __ZTcv0_n20_v0_n16_N8test16_D4foo1Ev
// CHECK-LP32-NEXT: .long __ZTcv0_n24_v0_n12_N9test16_B24foo2Ev
// CHECK-LP32-NEXT: .long __ZN8test16_B4foo3Ev
// CHECK-LP32-NEXT: .long __ZN8test16_B5foo_BEv
// CHECK-LP32-NEXT: .long 4294967268
// CHECK-LP32-NEXT: .long __ZTI8test16_D
// CHECK-LP32-NEXT .long __ZTcvn8_n20_v8_n16_N8test16_D4foo1Ev
// CHECK-LP32: .long __ZN10test16_NV27foo_NV2Ev
// CHECK-LP32-NEXT: .long __ZN10test16_NV28foo_NV2bEv
// CHECK-LP64: __ZTV1B:
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI1B
// CHECK-LP64-NEXT: .quad __ZN1B4bar1Ev
// CHECK-LP64-NEXT: .quad __ZN1B4bar2Ev
// CHECK-LP32: __ZTV1B:
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI1B
// CHECK-LP32-NEXT: .long __ZN1B4bar1Ev
// CHECK-LP32-NEXT: .long __ZN1B4bar2Ev
// CHECK-LP64: __ZTV1A:
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI1A
// CHECK-LP64-NEXT: .quad __ZN1B4bar1Ev
// CHECK-LP64-NEXT: .quad __ZN1B4bar2Ev
// CHECK-LP64-NEXT: .quad __ZN1A4foo1Ev
// CHECK-LP64-NEXT: .quad __ZN1A4foo2Ev
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad __ZTI1A
// CHECK-LP64-NEXT: .quad __ZN1C4bee1Ev
// CHECK-LP64-NEXT: .quad __ZN1C4bee2Ev
// CHECK-LP32: __ZTV1A:
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI1A
// CHECK-LP32-NEXT: .long __ZN1B4bar1Ev
// CHECK-LP32-NEXT: .long __ZN1B4bar2Ev
// CHECK-LP32-NEXT: .long __ZN1A4foo1Ev
// CHECK-LP32-NEXT: .long __ZN1A4foo2Ev
// CHECK-LP32-NEXT: .long 4294967284
// CHECK-LP32-NEXT: .long __ZTI1A
// CHECK-LP32-NEXT: .long __ZN1C4bee1Ev
// CHECK-LP32-NEXT: .long __ZN1C4bee2Ev
// CHECK-LP32:__ZTV1F:
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 8
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long __ZTI1F
// CHECK-LP32-NEXT: .long __ZN1D3booEv
// CHECK-LP32-NEXT: .long __ZN1F3fooEv
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .space 4
// CHECK-LP32-NEXT: .long 4294967288
// CHECK-LP32-NEXT: .long __ZTI1F
// CHECK-LP32-NEXT: .long __ZN2D13barEv
// CHECK-LP32-NEXT: .long __ZN2D14bar2Ev
// CHECK-LP32-NEXT: .long __ZN2D14bar3Ev
// CHECK-LP32-NEXT: .long __ZN2D14bar4Ev
// CHECK-LP32-NEXT: .long __ZN2D14bar5Ev
// CHECK-LP64: __ZTV1F:
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 16
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad __ZTI1F
// CHECK-LP64-NEXT: .quad __ZN1D3booEv
// CHECK-LP64-NEXT: .quad __ZN1F3fooEv
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .space 8
// CHECK-LP64-NEXT: .quad 18446744073709551600
// CHECK-LP64-NEXT: .quad __ZTI1F
// CHECK-LP64-NEXT: .quad __ZN2D13barEv
// CHECK-LP64-NEXT: .quad __ZN2D14bar2Ev
// CHECK-LP64-NEXT: .quad __ZN2D14bar3Ev
// CHECK-LP64-NEXT: .quad __ZN2D14bar4Ev
// CHECK-LP64-NEXT: .quad __ZN2D14bar5Ev
test16_D d16;
test15_D d15;
test13_D d13;
test11_D d11;
test10_D d10;
test9_D d9;
test8_D d8;
test5_D d5;
test4_D d4;
test3_D d3;
test6_D d6;
test7_D d7;
|