[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGenCXX / type-metadata.cpp
blob3f8b54af801f8d6cfaa164291d15833a1f14f1e9
1 // Tests for the cfi-vcall feature:
2 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-prefix=ITANIUM --check-prefix=ITANIUM-MD --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=NDIAG %s
3 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-prefix=ITANIUM --check-prefix=ITANIUM-MD --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-MD-DIAG --check-prefix=ITANIUM-DIAG --check-prefix=DIAG --check-prefix=DIAG-ABORT %s
4 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-recover=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-prefix=ITANIUM --check-prefix=ITANIUM-MD --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-MD-DIAG --check-prefix=ITANIUM-DIAG --check-prefix=DIAG --check-prefix=DIAG-RECOVER %s
5 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-prefix=MS --check-prefix=TT-MS --check-prefix=NDIAG %s
7 // Tests for the whole-program-vtables feature:
8 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM --check-prefix=ITANIUM-MD --check-prefix=TT-ITANIUM-HIDDEN %s
9 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM-DEFAULTVIS --check-prefix=TT-ITANIUM-DEFAULT %s
10 // RUN: %clang_cc1 -O2 -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=ITANIUM-OPT --check-prefix=ITANIUM-OPT-LAYOUT %s
11 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=MS --check-prefix=TT-MS %s
13 // Tests for cfi + whole-program-vtables:
14 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=ITANIUM --check-prefix=TC-ITANIUM --check-prefix=ITANIUM-MD %s
15 // RUN: %clang_cc1 -flto -flto-unit -triple x86_64-pc-windows-msvc -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=MS --check-prefix=TC-MS %s
17 // Equivalent tests for above, but with relative-vtables.
18 // Tests for the cfi-vcall feature:
19 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=RV-MD --check-prefix=ITANIUM --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=NDIAG --check-prefix=CFI-NVT-RV %s
20 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=CFI-NVT-RV --check-prefix=ITANIUM --check-prefix=RV-MD --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-DIAG --check-prefix=RV-MD-DIAG --check-prefix=DIAG --check-prefix=DIAG-ABORT %s
21 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-recover=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT --check-prefix=CFI-NVT-RV --check-prefix=ITANIUM --check-prefix=RV-MD --check-prefix=TT-ITANIUM-HIDDEN --check-prefix=ITANIUM-DIAG --check-prefix=RV-MD-DIAG --check-prefix=DIAG --check-prefix=DIAG-RECOVER %s
23 // Tests for the whole-program-vtables feature:
24 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM -check-prefix=RV-MD --check-prefix=TT-ITANIUM-HIDDEN %s
25 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=VTABLE-OPT --check-prefix=ITANIUM-DEFAULTVIS --check-prefix=TT-ITANIUM-DEFAULT %s
26 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -O2 -flto -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=ITANIUM-OPT --check-prefix=RV-OPT-LAYOUT %s
28 // Tests for cfi + whole-program-vtables:
29 // RUN: %clang_cc1 -fexperimental-relative-c++-abi-vtables -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-VT --check-prefix=ITANIUM --check-prefix=RV-MD --check-prefix=TC-ITANIUM %s
31 // ITANIUM: @_ZTV1A = {{[^!]*}}, !type [[A16:![0-9]+]]
32 // ITANIUM-DIAG-SAME: !type [[ALL16:![0-9]+]]
33 // ITANIUM-SAME: !type [[AF16:![0-9]+]]
35 // ITANIUM: @_ZTV1B = {{[^!]*}}, !type [[A32:![0-9]+]]
36 // ITANIUM-DIAG-SAME: !type [[ALL32:![0-9]+]]
37 // ITANIUM-SAME: !type [[AF32:![0-9]+]]
38 // ITANIUM-SAME: !type [[AF40:![0-9]+]]
39 // ITANIUM-SAME: !type [[AF48:![0-9]+]]
40 // ITANIUM-SAME: !type [[B32:![0-9]+]]
41 // ITANIUM-DIAG-SAME: !type [[ALL32]]
42 // ITANIUM-SAME: !type [[BF32:![0-9]+]]
43 // ITANIUM-SAME: !type [[BF40:![0-9]+]]
44 // ITANIUM-SAME: !type [[BF48:![0-9]+]]
46 // ITANIUM: @_ZTV1C = {{[^!]*}}, !type [[A32]]
47 // ITANIUM-DIAG-SAME: !type [[ALL32]]
48 // ITANIUM-SAME: !type [[AF32]]
49 // ITANIUM-SAME: !type [[C32:![0-9]+]]
50 // ITANIUM-DIAG-SAME: !type [[ALL32]]
51 // ITANIUM-SAME: !type [[CF32:![0-9]+]]
53 // DIAG: @[[SRC:.*]] = private unnamed_addr constant [{{.*}} x i8] c"{{.*}}type-metadata.cpp\00", align 1
54 // DIAG: @[[TYPE:.*]] = private unnamed_addr constant { i16, i16, [4 x i8] } { i16 -1, i16 0, [4 x i8] c"'A'\00" }
55 // DIAG: @[[BADTYPESTATIC:.*]] = private unnamed_addr global { i8, { ptr, i32, i32 }, ptr } { i8 0, { ptr, i32, i32 } { ptr @[[SRC]], i32 123, i32 3 }, ptr @[[TYPE]] }
57 // ITANIUM: @_ZTVN12_GLOBAL__N_11DE = {{[^!]*}}, !type [[A32]]
58 // ITANIUM-DIAG-SAME: !type [[ALL32]]
59 // ITANIUM-SAME: !type [[AF32]]
60 // ITANIUM-SAME: !type [[AF40]]
61 // ITANIUM-SAME: !type [[AF48]]
62 // ITANIUM-SAME: !type [[B32]]
63 // ITANIUM-DIAG-SAME: !type [[ALL32]]
64 // ITANIUM-SAME: !type [[BF32]]
65 // ITANIUM-SAME: !type [[BF40]]
66 // ITANIUM-SAME: !type [[BF48]]
67 // ITANIUM-SAME: !type [[C88:![0-9]+]]
68 // ITANIUM-DIAG-SAME: !type [[ALL88:![0-9]+]]
69 // ITANIUM-SAME: !type [[CF32]]
70 // ITANIUM-SAME: !type [[CF40:![0-9]+]]
71 // ITANIUM-SAME: !type [[CF48:![0-9]+]]
72 // ITANIUM-SAME: !type [[D32:![0-9]+]]
73 // ITANIUM-DIAG-SAME: !type [[ALL32]]
74 // ITANIUM-SAME: !type [[DF32:![0-9]+]]
75 // ITANIUM-SAME: !type [[DF40:![0-9]+]]
76 // ITANIUM-SAME: !type [[DF48:![0-9]+]]
78 // ITANIUM: @_ZTCN12_GLOBAL__N_11DE0_1B = {{[^!]*}}, !type [[A32]]
79 // ITANIUM-DIAG-SAME: !type [[ALL32]]
80 // ITANIUM-SAME: !type [[B32]]
81 // ITANIUM-DIAG-SAME: !type [[ALL32]]
83 // ITANIUM: @_ZTCN12_GLOBAL__N_11DE8_1C = {{[^!]*}}, !type [[A64:![0-9]+]]
84 // ITANIUM-DIAG-SAME: !type [[ALL64:![0-9]+]]
85 // ITANIUM-SAME: !type [[AF64:![0-9]+]]
86 // ITANIUM-SAME: !type [[C32]]
87 // ITANIUM-DIAG-SAME: !type [[ALL32]]
88 // ITANIUM-SAME: !type [[CF64:![0-9]+]]
90 // ITANIUM: @_ZTVZ3foovE2FA = {{[^!]*}}, !type [[A16]]
91 // ITANIUM-DIAG-SAME: !type [[ALL16]]
92 // ITANIUM-SAME: !type [[AF16]]
93 // ITANIUM-SAME: !type [[FA16:![0-9]+]]
94 // ITANIUM-DIAG-SAME: !type [[ALL16]]
95 // ITANIUM-SAME: !type [[FAF16:![0-9]+]]
97 // ITANIUM: @_ZTVN5test31EE = external unnamed_addr constant
98 // ITANIUM-DEFAULTVIS: @_ZTVN5test31EE = external unnamed_addr constant
99 // ITANIUM-OPT: @_ZTVN5test31EE = available_externally unnamed_addr constant {{[^!]*}},
100 // ITANIUM-OPT-SAME: !type [[E16:![0-9]+]],
101 // ITANIUM-OPT-SAME: !type [[EF16:![0-9]+]]
102 // ITANIUM-OPT: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZTVN5test31EE]
104 // MS: comdat($"??_7A@@6B@"), !type [[A8:![0-9]+]]
105 // MS: comdat($"??_7B@@6B0@@"), !type [[B8:![0-9]+]]
106 // MS: comdat($"??_7B@@6BA@@@"), !type [[A8]]
107 // MS: comdat($"??_7C@@6B@"), !type [[A8]]
108 // MS: comdat($"??_7D@?A0x{{[^@]*}}@@6BB@@@"), !type [[B8]], !type [[D8:![0-9]+]]
109 // MS: comdat($"??_7D@?A0x{{[^@]*}}@@6BA@@@"), !type [[A8]]
110 // MS: comdat($"??_7FA@?1??foo@@YAXXZ@6B@"), !type [[A8]], !type [[FA8:![0-9]+]]
112 struct A {
113 A();
114 virtual void f();
117 struct B : virtual A {
118 B();
119 virtual void g();
120 virtual void h();
123 struct C : virtual A {
124 C();
127 namespace {
129 struct D : B, C {
130 D();
131 virtual void f();
132 virtual void h();
137 A::A() {}
138 B::B() {}
139 C::C() {}
140 D::D() {}
142 void A::f() {
145 void B::g() {
148 void D::f() {
151 void D::h() {
154 // ITANIUM: define hidden void @_Z2afP1A
155 // ITANIUM-DEFAULTVIS: define{{.*}} void @_Z2afP1A
156 // MS: define dso_local void @"?af@@YAXPEAUA@@@Z"
157 void af(A *a) {
158 // TT-ITANIUM-HIDDEN: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr [[VT:%[^ ]*]], metadata !"_ZTS1A")
159 // TT-ITANIUM-DEFAULT: [[P:%[^ ]*]] = call i1 @llvm.public.type.test(ptr [[VT:%[^ ]*]], metadata !"_ZTS1A")
160 // TT-MS: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr [[VT:%[^ ]*]], metadata !"?AUA@@")
161 // TC-ITANIUM: [[PAIR:%[^ ]*]] = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"_ZTS1A")
162 // TC-MS: [[PAIR:%[^ ]*]] = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUA@@")
163 // CFI-VT: [[P:%[^ ]*]] = extractvalue { ptr, i1 } [[PAIR]], 1
164 // DIAG-NEXT: [[VTVALID0:%[^ ]*]] = call i1 @llvm.type.test(ptr [[VT]], metadata !"all-vtables")
165 // VTABLE-OPT: call void @llvm.assume(i1 [[P]])
166 // CFI-NEXT: br i1 [[P]], label %[[CONTBB:[^ ,]*]], label %[[TRAPBB:[^ ,]*]]
167 // CFI-NEXT: {{^$}}
169 // CFI: [[TRAPBB]]
170 // NDIAG-NEXT: call void @llvm.ubsantrap(i8 2)
171 // NDIAG-NEXT: unreachable
172 // DIAG-NEXT: [[VTINT:%[^ ]*]] = ptrtoint ptr [[VT]] to i64
173 // DIAG-NEXT: [[VTVALID:%[^ ]*]] = zext i1 [[VTVALID0]] to i64
174 // DIAG-ABORT-NEXT: call void @__ubsan_handle_cfi_check_fail_abort(ptr @[[BADTYPESTATIC]], i64 [[VTINT]], i64 [[VTVALID]])
175 // DIAG-ABORT-NEXT: unreachable
176 // DIAG-RECOVER-NEXT: call void @__ubsan_handle_cfi_check_fail(ptr @[[BADTYPESTATIC]], i64 [[VTINT]], i64 [[VTVALID]])
177 // DIAG-RECOVER-NEXT: br label %[[CONTBB]]
179 // CFI: [[CONTBB]]
180 // CFI-NVT-NO-RV: [[PTR:%[^ ]*]] = load
181 // CFI-NVT-RV: [[PTR:%[^ ]*]] = call ptr @llvm.load.relative.i32
182 // CFI-VT: [[PTR:%[^ ]*]] = extractvalue { ptr, i1 } [[PAIR]], 0
183 // CFI: call void [[PTR]]
184 #line 123
185 a->f();
188 // ITANIUM: define internal void @_Z3df1PN12_GLOBAL__N_11DE
189 // MS: define internal void @"?df1@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
190 void df1(D *d) {
191 // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
192 // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
193 // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"?AUA@@")
194 // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata ![[DTYPE:[0-9]+]])
195 // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUA@@")
196 d->f();
199 // ITANIUM: define internal void @_Z3dg1PN12_GLOBAL__N_11DE
200 // MS: define internal void @"?dg1@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
201 void dg1(D *d) {
202 // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
203 // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.public.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
204 // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"?AUB@@")
205 // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 8, metadata !"_ZTS1B")
206 // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUB@@")
207 d->g();
210 // ITANIUM: define internal void @_Z3dh1PN12_GLOBAL__N_11DE
211 // MS: define internal void @"?dh1@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
212 void dh1(D *d) {
213 // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE]])
214 // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE]])
215 // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata ![[DTYPE:[0-9]+]])
216 // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 16, metadata ![[DTYPE]])
217 // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 8, metadata ![[DTYPE:[0-9]+]])
218 d->h();
221 // ITANIUM: define internal void @_Z3df2PN12_GLOBAL__N_11DE
222 // MS: define internal void @"?df2@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
223 __attribute__((no_sanitize("cfi")))
224 void df2(D *d) {
225 // CFI-NVT-NOT: call i1 @llvm.type.test
226 // CFI-VT: [[P:%[^ ]*]] = call i1 @llvm.type.test
227 // CFI-VT: call void @llvm.assume(i1 [[P]])
228 d->f();
231 // ITANIUM: define internal void @_Z3df3PN12_GLOBAL__N_11DE
232 // MS: define internal void @"?df3@@YAXPEAUD@?A0x{{[^@]*}}@@@Z"
233 __attribute__((no_sanitize("address"))) __attribute__((no_sanitize("cfi-vcall")))
234 void df3(D *d) {
235 // CFI-NVT-NOT: call i1 @llvm.type.test
236 // CFI-VT: [[P:%[^ ]*]] = call i1 @llvm.type.test
237 // CFI-VT: call void @llvm.assume(i1 [[P]])
238 d->f();
241 D d;
243 void foo() {
244 df1(&d);
245 dg1(&d);
246 dh1(&d);
247 df2(&d);
248 df3(&d);
250 struct FA : A {
251 void f() {}
252 } fa;
253 af(&fa);
256 namespace test2 {
258 struct A {
259 virtual void m_fn1();
261 struct B {
262 virtual void m_fn2();
264 struct C : B, A {};
265 struct D : C {
266 void m_fn1();
269 // ITANIUM: define hidden void @_ZN5test21fEPNS_1DE
270 // ITANIUM-DEFAULTVIS: define{{.*}} void @_ZN5test21fEPNS_1DE
271 // MS: define dso_local void @"?f@test2@@YAXPEAUD@1@@Z"
272 void f(D *d) {
273 // TT-ITANIUM-HIDDEN: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTSN5test21DE")
274 // TT-ITANIUM-DEFAULT: {{%[^ ]*}} = call i1 @llvm.public.type.test(ptr {{%[^ ]*}}, metadata !"_ZTSN5test21DE")
275 // TT-MS: {{%[^ ]*}} = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"?AUA@test2@@")
276 // TC-ITANIUM: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 8, metadata !"_ZTSN5test21DE")
277 // TC-MS: {{%[^ ]*}} = call { ptr, i1 } @llvm.type.checked.load(ptr {{%[^ ]*}}, i32 0, metadata !"?AUA@test2@@")
278 d->m_fn1();
283 namespace test3 {
284 // All virtual functions are outline, so we can assume that it will
285 // be generated in translation unit where foo is defined.
286 struct E {
287 virtual void foo();
290 void g() {
291 E e;
292 e.foo();
295 } // Test9
297 // RV-MD: [[A16]] = !{i64 8, !"_ZTS1A"}
298 // RV-MD-DIAG: [[ALL16]] = !{i64 8, !"all-vtables"}
299 // RV-MD: [[AF16]] = !{i64 8, !"_ZTSM1AFvvE.virtual"}
300 // RV-MD: [[A32]] = !{i64 16, !"_ZTS1A"}
301 // RV-MD-DIAG: [[ALL32]] = !{i64 16, !"all-vtables"}
302 // RV-MD: [[AF32]] = !{i64 16, !"_ZTSM1AFvvE.virtual"}
303 // RV-MD: [[AF40]] = !{i64 20, !"_ZTSM1AFvvE.virtual"}
304 // RV-MD: [[AF48]] = !{i64 24, !"_ZTSM1AFvvE.virtual"}
305 // RV-MD: [[B32]] = !{i64 16, !"_ZTS1B"}
306 // RV-MD: [[BF32]] = !{i64 16, !"_ZTSM1BFvvE.virtual"}
307 // RV-MD: [[BF40]] = !{i64 20, !"_ZTSM1BFvvE.virtual"}
308 // RV-MD: [[BF48]] = !{i64 24, !"_ZTSM1BFvvE.virtual"}
309 // RV-MD: [[C32]] = !{i64 16, !"_ZTS1C"}
310 // RV-MD: [[CF32]] = !{i64 16, !"_ZTSM1CFvvE.virtual"}
311 // RV-MD: [[C88]] = !{i64 44, !"_ZTS1C"}
312 // RV-MD-DIAG: [[ALL88]] = !{i64 44, !"all-vtables"}
313 // RV-MD: [[CF40]] = !{i64 20, !"_ZTSM1CFvvE.virtual"}
314 // RV-MD: [[CF48]] = !{i64 24, !"_ZTSM1CFvvE.virtual"}
315 // RV-MD: [[D32]] = !{i64 16, [[D_ID:![0-9]+]]}
316 // RV-MD: [[D_ID]] = distinct !{}
317 // RV-MD: [[DF32]] = !{i64 16, [[DF_ID:![0-9]+]]}
318 // RV-MD: [[DF_ID]] = distinct !{}
319 // RV-MD: [[DF40]] = !{i64 20, [[DF_ID]]}
320 // RV-MD: [[DF48]] = !{i64 24, [[DF_ID]]}
321 // RV-MD: [[A64]] = !{i64 32, !"_ZTS1A"}
322 // RV-MD-DIAG: [[ALL64]] = !{i64 32, !"all-vtables"}
323 // RV-MD: [[AF64]] = !{i64 32, !"_ZTSM1AFvvE.virtual"}
324 // RV-MD: [[CF64]] = !{i64 32, !"_ZTSM1CFvvE.virtual"}
325 // RV-MD: [[FA16]] = !{i64 8, [[FA_ID:![0-9]+]]}
326 // RV-MD: [[FA_ID]] = distinct !{}
327 // RV-MD: [[FAF16]] = !{i64 8, [[FAF_ID:![0-9]+]]}
328 // RV-MD: [[FAF_ID]] = distinct !{}
330 // ITANIUM-MD: [[A16]] = !{i64 16, !"_ZTS1A"}
331 // ITANIUM-MD-DIAG: [[ALL16]] = !{i64 16, !"all-vtables"}
332 // ITANIUM-MD: [[AF16]] = !{i64 16, !"_ZTSM1AFvvE.virtual"}
333 // ITANIUM-MD: [[A32]] = !{i64 32, !"_ZTS1A"}
334 // ITANIUM-MD-DIAG: [[ALL32]] = !{i64 32, !"all-vtables"}
335 // ITANIUM-MD: [[AF32]] = !{i64 32, !"_ZTSM1AFvvE.virtual"}
336 // ITANIUM-MD: [[AF40]] = !{i64 40, !"_ZTSM1AFvvE.virtual"}
337 // ITANIUM-MD: [[AF48]] = !{i64 48, !"_ZTSM1AFvvE.virtual"}
338 // ITANIUM-MD: [[B32]] = !{i64 32, !"_ZTS1B"}
339 // ITANIUM-MD: [[BF32]] = !{i64 32, !"_ZTSM1BFvvE.virtual"}
340 // ITANIUM-MD: [[BF40]] = !{i64 40, !"_ZTSM1BFvvE.virtual"}
341 // ITANIUM-MD: [[BF48]] = !{i64 48, !"_ZTSM1BFvvE.virtual"}
342 // ITANIUM-MD: [[C32]] = !{i64 32, !"_ZTS1C"}
343 // ITANIUM-MD: [[CF32]] = !{i64 32, !"_ZTSM1CFvvE.virtual"}
344 // ITANIUM-MD: [[C88]] = !{i64 88, !"_ZTS1C"}
345 // ITANIUM-MD-DIAG: [[ALL88]] = !{i64 88, !"all-vtables"}
346 // ITANIUM-MD: [[CF40]] = !{i64 40, !"_ZTSM1CFvvE.virtual"}
347 // ITANIUM-MD: [[CF48]] = !{i64 48, !"_ZTSM1CFvvE.virtual"}
348 // ITANIUM-MD: [[D32]] = !{i64 32, [[D_ID:![0-9]+]]}
349 // ITANIUM-MD: [[D_ID]] = distinct !{}
350 // ITANIUM-MD: [[DF32]] = !{i64 32, [[DF_ID:![0-9]+]]}
351 // ITANIUM-MD: [[DF_ID]] = distinct !{}
352 // ITANIUM-MD: [[DF40]] = !{i64 40, [[DF_ID]]}
353 // ITANIUM-MD: [[DF48]] = !{i64 48, [[DF_ID]]}
354 // ITANIUM-MD: [[A64]] = !{i64 64, !"_ZTS1A"}
355 // ITANIUM-MD-DIAG: [[ALL64]] = !{i64 64, !"all-vtables"}
356 // ITANIUM-MD: [[AF64]] = !{i64 64, !"_ZTSM1AFvvE.virtual"}
357 // ITANIUM-MD: [[CF64]] = !{i64 64, !"_ZTSM1CFvvE.virtual"}
358 // ITANIUM-MD: [[FA16]] = !{i64 16, [[FA_ID:![0-9]+]]}
359 // ITANIUM-MD: [[FA_ID]] = distinct !{}
360 // ITANIUM-MD: [[FAF16]] = !{i64 16, [[FAF_ID:![0-9]+]]}
361 // ITANIUM-MD: [[FAF_ID]] = distinct !{}
363 // ITANIUM-OPT-LAYOUT: [[E16]] = !{i64 16, !"_ZTSN5test31EE"}
364 // ITANIUM-OPT-LAYOUT: [[EF16]] = !{i64 16, !"_ZTSMN5test31EEFvvE.virtual"}
365 // RV-OPT-LAYOUT: [[E16]] = !{i64 8, !"_ZTSN5test31EE"}
366 // RV-OPT-LAYOUT: [[EF16]] = !{i64 8, !"_ZTSMN5test31EEFvvE.virtual"}
368 // MS: [[A8]] = !{i64 8, !"?AUA@@"}
369 // MS: [[B8]] = !{i64 8, !"?AUB@@"}
370 // MS: [[D8]] = !{i64 8, [[D_ID:![0-9]+]]}
371 // MS: [[D_ID]] = distinct !{}
372 // MS: [[FA8]] = !{i64 8, [[FA_ID:![0-9]+]]}
373 // MS: [[FA_ID]] = distinct !{}