1 // RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-passes -std=c++03 > %t
2 // RUN: FileCheck --check-prefix=CHECK1 --input-file=%t %s
3 // RUN: FileCheck --check-prefix=CHECK2 --input-file=%t %s
4 // RUN: FileCheck --check-prefix=CHECK3 --input-file=%t %s
5 // RUN: FileCheck --check-prefixes=CHECK4,CHECK4v03 --input-file=%t %s
6 // RUN: FileCheck --check-prefixes=CHECK5,CHECK5v03 --input-file=%t %s
7 // RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-passes -std=c++11 > %t2
8 // RUN: FileCheck --check-prefix=CHECK1 --input-file=%t2 %s
9 // RUN: FileCheck --check-prefix=CHECK2v11 --input-file=%t2 %s
10 // RUN: FileCheck --check-prefix=CHECK3 --input-file=%t2 %s
11 // RUN: FileCheck --check-prefixes=CHECK4,CHECK4v11 --input-file=%t2 %s
12 // RUN: FileCheck --check-prefixes=CHECK5,CHECK5v11 --input-file=%t2 %s
13 // RUN: FileCheck --check-prefix=CHECK6 --input-file=%t2 %s
22 // Base with non-trivial destructor
29 // Field with non-trivial destructor
44 struct allocator_derived
: allocator
{ };
46 // CHECK1-LABEL: define{{.*}} void @_ZN6PR75263fooEv()
47 // CHECK1: call void {{.*}} @_ZN6PR75269allocatorD2Ev
49 // CHECK1-LABEL: define{{.*}} void @_ZN6PR75269allocatorD2Ev(%"struct.PR7526::allocator"* {{[^,]*}} %this) unnamed_addr
50 // CHECK1: call void @__cxa_call_unexpected
51 allocator::~allocator() throw() { foo(); }
64 template<> A1
<char>::~A1();
80 // FIXME: there's a known problem in the codegen here where, if one
81 // destructor throws, the remaining destructors aren't run. Fix it,
82 // then make this code check for it.
85 struct VBase
{ ~VBase(); };
86 struct Base
{ ~Base(); };
87 struct Member
{ ~Member(); };
94 // The function-try-block won't suppress -mconstructor-aliases here.
95 A::~A() try { } catch (int i
) {}
97 // complete destructor alias tested above
99 // CHECK2-LABEL: @_ZN5test01AD1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN5test01AD2Ev
100 // CHECK2-LABEL: define{{.*}} void @_ZN5test01AD2Ev(%"struct.test0::A"* {{[^,]*}} %this) unnamed_addr
101 // CHECK2: invoke void @_ZN5test06MemberD1Ev
102 // CHECK2: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
103 // CHECK2: invoke void @_ZN5test04BaseD2Ev
104 // CHECK2: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
106 // In C++11, the destructors are often known not to throw.
107 // CHECK2v11-LABEL: @_ZN5test01AD1Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN5test01AD2Ev
108 // CHECK2v11-LABEL: define{{.*}} void @_ZN5test01AD2Ev(%"struct.test0::A"* {{[^,]*}} %this) unnamed_addr
109 // CHECK2v11: call void @_ZN5test06MemberD1Ev
110 // CHECK2v11: call void @_ZN5test04BaseD2Ev
112 struct B
: Base
, virtual VBase
{
116 B::~B() try { } catch (int i
) {}
117 // It will suppress the delegation optimization here, though.
119 // CHECK2-LABEL: define{{.*}} void @_ZN5test01BD2Ev(%"struct.test0::B"* {{[^,]*}} %this, i8** noundef %vtt) unnamed_addr
120 // CHECK2: invoke void @_ZN5test06MemberD1Ev
121 // CHECK2: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
122 // CHECK2: invoke void @_ZN5test04BaseD2Ev
123 // CHECK2: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
125 // CHECK2v11-LABEL: define{{.*}} void @_ZN5test01BD2Ev(%"struct.test0::B"* {{[^,]*}} %this, i8** noundef %vtt) unnamed_addr
126 // CHECK2v11: call void @_ZN5test06MemberD1Ev
127 // CHECK2v11: call void @_ZN5test04BaseD2Ev
129 // CHECK2-LABEL: define{{.*}} void @_ZN5test01BD1Ev(%"struct.test0::B"* {{[^,]*}} %this) unnamed_addr
130 // CHECK2: invoke void @_ZN5test06MemberD1Ev
131 // CHECK2: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
132 // CHECK2: invoke void @_ZN5test04BaseD2Ev
133 // CHECK2: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
134 // CHECK2: invoke void @_ZN5test05VBaseD2Ev
135 // CHECK2: unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]]
137 // CHECK2v11-LABEL: define{{.*}} void @_ZN5test01BD1Ev(%"struct.test0::B"* {{[^,]*}} %this) unnamed_addr
138 // CHECK2v11: call void @_ZN5test06MemberD1Ev
139 // CHECK2v11: call void @_ZN5test04BaseD2Ev
140 // CHECK2v11: call void @_ZN5test05VBaseD2Ev
143 // Test base-class aliasing.
145 struct A
{ ~A(); char ***m
; }; // non-trivial destructor
146 struct B
{ ~B(); }; // non-trivial destructor
147 struct Empty
{ }; // trivial destructor, empty
148 struct NonEmpty
{ int x
; }; // trivial destructor, non-empty
150 // There must be a definition in this translation unit for the alias
151 // optimization to apply.
152 A::~A() { delete m
; }
154 struct M
: A
{ ~M(); };
156 // CHECK3: @_ZN5test11MD2Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN5test11AD2Ev
158 struct N
: A
, Empty
{ ~N(); };
160 // CHECK3: @_ZN5test11ND2Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN5test11AD2Ev
162 struct O
: Empty
, A
{ ~O(); };
164 // CHECK3: @_ZN5test11OD2Ev ={{.*}} unnamed_addr alias {{.*}} @_ZN5test11AD2Ev
166 struct P
: NonEmpty
, A
{ ~P(); };
167 P::~P() {} // CHECK3-LABEL: define{{.*}} void @_ZN5test11PD2Ev(%"struct.test1::P"* {{[^,]*}} %this) unnamed_addr
169 struct Q
: A
, B
{ ~Q(); };
170 Q::~Q() {} // CHECK3-LABEL: define{{.*}} void @_ZN5test11QD2Ev(%"struct.test1::Q"* {{[^,]*}} %this) unnamed_addr
172 struct R
: A
{ ~R(); };
173 R::~R() { A a
; } // CHECK3-LABEL: define{{.*}} void @_ZN5test11RD2Ev(%"struct.test1::R"* {{[^,]*}} %this) unnamed_addr
175 struct S
: A
{ ~S(); int x
; };
177 // CHECK4: @_ZN5test11SD2Ev ={{.*}} unnamed_addr alias {{.*}}, bitcast {{.*}} @_ZN5test11AD2Ev
179 struct T
: A
{ ~T(); B x
; };
180 T::~T() {} // CHECK4-LABEL: define{{.*}} void @_ZN5test11TD2Ev(%"struct.test1::T"* {{[^,]*}} %this) unnamed_addr
182 // The VTT parameter prevents this. We could still make this work
183 // for calling conventions that are safe against extra parameters.
184 struct U
: A
, virtual B
{ ~U(); };
185 U::~U() {} // CHECK4-LABEL: define{{.*}} void @_ZN5test11UD2Ev(%"struct.test1::U"* {{[^,]*}} %this, i8** noundef %vtt) unnamed_addr
190 struct A
{ ~A(); char ***m
; };
191 struct B
: A
{ ~B(); };
194 // CHECK4-LABEL: define{{.*}} void @_ZN5test21BD2Ev(%"struct.test2::B"* {{[^,]*}} %this) unnamed_addr
195 // CHECK4: call void @_ZN5test21AD2Ev
200 struct A
{ virtual ~A(); };
201 struct B
{ virtual ~B(); };
202 namespace { // internal linkage => deferred
203 struct C
: A
, B
{}; // ~B() in D requires a this-adjustment thunk
204 struct D
: C
{}; // D::~D() is an alias to C::~C()
208 new D
; // Force emission of D's vtable
211 // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::(anonymous namespace)::C"* {{[^,]*}} %this) unnamed_addr
212 // CHECK4v03: invoke void @_ZN5test31BD2Ev(
213 // CHECK4v11: call void @_ZN5test31BD2Ev(
214 // CHECK4: call void @_ZN5test31AD2Ev(
217 // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::(anonymous namespace)::D"* {{[^,]*}} %this) unnamed_addr
218 // CHECK4v03-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
219 // CHECK4v03: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
220 // CHECK4v11: call void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
221 // CHECK4: call void @_ZdlPv({{.*}}) [[NUW:#[0-9]+]]
223 // CHECK4v03: landingpad { i8*, i32 }
224 // CHECK4v03-NEXT: cleanup
225 // CHECK4v03: call void @_ZdlPv({{.*}}) [[NUW]]
226 // CHECK4v03: resume { i8*, i32 }
227 // CHECK4v11-NOT: landingpad
229 // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD1Ev(
230 // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8
231 // CHECK4: call void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
234 // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD0Ev(
235 // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8
236 // CHECK4: call void @_ZN5test312_GLOBAL__N_11DD0Ev(
239 // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::(anonymous namespace)::C"* {{[^,]*}} %this) unnamed_addr
240 // CHECK4v03-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
241 // CHECK4v03: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev(
242 // CHECK4v11: call void @_ZN5test312_GLOBAL__N_11CD2Ev(
243 // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]]
245 // CHECK4v03: landingpad { i8*, i32 }
246 // CHECK4v03-NEXT: cleanup
247 // CHECK4v03: call void @_ZdlPv({{.*}}) [[NUW]]
248 // CHECK4v03: resume { i8*, i32 }
250 // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev(
251 // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8
252 // CHECK4: call void @_ZN5test312_GLOBAL__N_11CD2Ev(
255 // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD0Ev(
256 // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8
257 // CHECK4: call void @_ZN5test312_GLOBAL__N_11CD0Ev(
260 // CHECK4-LABEL: declare void @_ZN5test31BD2Ev(
261 // CHECK4-LABEL: declare void @_ZN5test31AD2Ev(
263 // CHECK4: attributes [[NUW]] = {{[{].*}} nounwind {{.*[}]}}
269 // CHECK5-LABEL: define{{.*}} void @_ZN5test43fooEv()
270 // CHECK5: call void @_ZN5test41AD1Ev
282 // CHECK5-LABEL: define{{.*}} void @_ZN5test43barEi(
283 // CHECK5: [[X:%.*]] = alloca i32
284 // CHECK5-NEXT: [[A:%.*]] = alloca
286 // CHECK5: [[TMP:%.*]] = load i32, i32* [[X]]
287 // CHECK5-NEXT: [[CMP:%.*]] = icmp ne i32 [[TMP]], 0
288 // CHECK5-NEXT: br i1
289 // CHECK5: call void @_ZN5test41AD1Ev(
291 // CHECK5: [[TMP:%.*]] = load i32, i32* [[X]]
292 // CHECK5: [[TMP2:%.*]] = add nsw i32 [[TMP]], -1
293 // CHECK5: store i32 [[TMP2]], i32* [[X]]
307 // CHECK5-LABEL: define{{.*}} void @_ZN5test53fooEv()
308 // CHECK5: [[ELEMS:%.*]] = alloca [5 x [[A:%.*]]], align
309 // CHECK5v03-NEXT: [[EXN:%.*]] = alloca i8*
310 // CHECK5v03-NEXT: [[SEL:%.*]] = alloca i32
311 // CHECK5-NEXT: [[PELEMS:%.*]] = bitcast [5 x [[A]]]* [[ELEMS]] to i8*
312 // CHECK5-NEXT: call void @llvm.lifetime.start.p0i8(i64 5, i8* [[PELEMS]])
313 // CHECK5-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [5 x [[A]]], [5 x [[A]]]* [[ELEMS]], i32 0, i32 0
314 // CHECK5-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 5
315 // CHECK5-NEXT: br label
316 // CHECK5: [[POST:%.*]] = phi [[A]]* [ [[END]], {{%.*}} ], [ [[ELT:%.*]], {{%.*}} ]
317 // CHECK5-NEXT: [[ELT]] = getelementptr inbounds [[A]], [[A]]* [[POST]], i64 -1
318 // CHECK5v03-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* {{[^,]*}} [[ELT]])
319 // CHECK5v11-NEXT: call void @_ZN5test51AD1Ev([[A]]* {{[^,]*}} [[ELT]])
320 // CHECK5: [[T0:%.*]] = icmp eq [[A]]* [[ELT]], [[BEGIN]]
321 // CHECK5-NEXT: br i1 [[T0]],
322 // CHECK5: call void @llvm.lifetime.end
323 // CHECK5-NEXT: ret void
325 // CHECK5v03: [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[ELT]]
326 // CHECK5v03-NEXT: br i1 [[EMPTY]]
327 // CHECK5v03: [[AFTER:%.*]] = phi [[A]]* [ [[ELT]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ]
328 // CHECK5v03-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], [[A]]* [[AFTER]], i64 -1
329 // CHECK5v03-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* {{[^,]*}} [[CUR]])
330 // CHECK5v03: [[DONE:%.*]] = icmp eq [[A]]* [[CUR]], [[BEGIN]]
331 // CHECK5v03-NEXT: br i1 [[DONE]],
332 // CHECK5v11-NOT: landingpad
343 template <unsigned> struct B
{ B(); ~B(); int _
; };
344 struct C
: B
<0>, B
<1>, virtual B
<2>, virtual B
<3> {
352 // CHECK5-LABEL: define{{.*}} void @_ZN5test61CC1Ev(%"struct.test6::C"* {{[^,]*}} %this) unnamed_addr
353 // CHECK5: call void @_ZN5test61BILj2EEC2Ev
354 // CHECK5: invoke void @_ZN5test61BILj3EEC2Ev
355 // CHECK5: invoke void @_ZN5test61BILj0EEC2Ev
356 // CHECK5: invoke void @_ZN5test61BILj1EEC2Ev
357 // CHECK5: invoke void @_ZN5test66opaqueEv
359 // FIXME: way too much EH cleanup code follows
361 C::~C() { opaque(); }
362 // CHECK5-LABEL: define{{.*}} void @_ZN5test61CD2Ev(%"struct.test6::C"* {{[^,]*}} %this, i8** noundef %vtt) unnamed_addr
363 // CHECK5: invoke void @_ZN5test66opaqueEv
364 // CHECK5v03: invoke void @_ZN5test61AD1Ev
365 // CHECK5v03: invoke void @_ZN5test61AD1Ev
366 // CHECK5v03: invoke void @_ZN5test61AD1Ev
367 // CHECK5v03: invoke void @_ZN5test61BILj1EED2Ev
368 // CHECK5v11: call void @_ZN5test61AD1Ev
369 // CHECK5v11: call void @_ZN5test61AD1Ev
370 // CHECK5v11: call void @_ZN5test61AD1Ev
371 // CHECK5v11: call void @_ZN5test61BILj1EED2Ev
372 // CHECK5: call void @_ZN5test61BILj0EED2Ev
374 // CHECK5v03: invoke void @_ZN5test61AD1Ev
375 // CHECK5v03: invoke void @_ZN5test61AD1Ev
376 // CHECK5v03: invoke void @_ZN5test61AD1Ev
377 // CHECK5v03: invoke void @_ZN5test61BILj1EED2Ev
378 // CHECK5v03: invoke void @_ZN5test61BILj0EED2Ev
380 // CHECK5-LABEL: define{{.*}} void @_ZN5test61CD1Ev(%"struct.test6::C"* {{[^,]*}} %this) unnamed_addr
381 // CHECK5v03: invoke void @_ZN5test61CD2Ev
382 // CHECK5v03: invoke void @_ZN5test61BILj3EED2Ev
383 // CHECK5v03: call void @_ZN5test61BILj2EED2Ev
384 // CHECK5v03: ret void
385 // CHECK5v03: invoke void @_ZN5test61BILj3EED2Ev
386 // CHECK5v03: invoke void @_ZN5test61BILj2EED2Ev
388 // CHECK5v11: call void @_ZN5test61CD2Ev
389 // CHECK5v11: call void @_ZN5test61BILj3EED2Ev
390 // CHECK5v11: call void @_ZN5test61BILj2EED2Ev
391 // CHECK5v11: ret void
401 struct B
: public A
{
406 // Verify that this doesn't get emitted as an alias
407 // CHECK5-LABEL: define{{.*}} void @_ZN5test71BD2Ev(
408 // CHECK5v03: invoke void @_ZN5test71DD1Ev(
409 // CHECK5v11: call void @_ZN5test71DD1Ev(
410 // CHECK5: call void @_ZN5test71AD2Ev(
416 struct A
{ A(); ~A(); };
418 void die() __attribute__((noreturn
));
428 // CHECK5-LABEL: define{{.*}} void @_ZN5test84testEv()
429 // CHECK5: [[X:%.*]] = alloca [[A:%.*]], align 1
430 // CHECK5-NEXT: [[Y:%.*]] = alloca [[A:%.*]], align 1
431 // CHECK5: call void @_ZN5test81AC1Ev([[A]]* {{[^,]*}} [[X]])
432 // CHECK5-NEXT: br label
433 // CHECK5: invoke void @_ZN5test81AC1Ev([[A]]* {{[^,]*}} [[Y]])
434 // CHECK5v03: invoke void @_ZN5test81AD1Ev([[A]]* {{[^,]*}} [[Y]])
435 // CHECK5v11: call void @_ZN5test81AD1Ev([[A]]* {{[^,]*}} [[Y]])
436 // CHECK5-NOT: switch
437 // CHECK5: invoke void @_ZN5test83dieEv()
438 // CHECK5: unreachable
447 void f1(const ArgType
& = ArgType());
453 // CHECK5: call void @_ZN5test97ArgTypeD1Ev(%"struct.test9::ArgType"* {{[^,]*}} %
454 // CHECK5: call void @_ZN5test92f2Ev()
458 // We used to crash trying to replace _ZN6test106OptionD1Ev with
459 // _ZN6test106OptionD2Ev twice.
463 template <class DataType
> class opt
: public Option
{};
464 template class opt
<int>;
465 // CHECK5-LABEL: define{{.*}} zeroext i1 @_ZN6test1016handleOccurrenceEv(
466 bool handleOccurrence() {
467 // CHECK5: call void @_ZN6test106OptionD2Ev(
473 #if __cplusplus >= 201103L
476 // Check that lifetime.end is emitted in the landing pad.
478 // CHECK6-LABEL: define{{.*}} void @_ZN6test1115testLifetimeEndEi(
480 // CHECK6: [[T1:%[a-z0-9]+]] = alloca %"struct.test11::S1"
481 // CHECK6: [[T2:%[a-z0-9]+]] = alloca %"struct.test11::S1"
482 // CHECK6: [[T3:%[a-z0-9]+]] = alloca %"struct.test11::S1"
484 // CHECK6: {{^}}invoke.cont
485 // CHECK6: call void @_ZN6test112S1D1Ev(%"struct.test11::S1"* {{[^,]*}} [[T1]])
486 // CHECK6: [[BC1:%[a-z0-9]+]] = bitcast %"struct.test11::S1"* [[T1]] to i8*
487 // CHECK6: call void @llvm.lifetime.end.p0i8(i64 32, i8* [[BC1]])
489 // CHECK6: call void @_ZN6test112S1D1Ev(%"struct.test11::S1"* {{[^,]*}} [[T1]])
490 // CHECK6: [[BC2:%[a-z0-9]+]] = bitcast %"struct.test11::S1"* [[T1]] to i8*
491 // CHECK6: call void @llvm.lifetime.end.p0i8(i64 32, i8* [[BC2]])
493 // CHECK6: {{^}}invoke.cont
494 // CHECK6: call void @_ZN6test112S1D1Ev(%"struct.test11::S1"* {{[^,]*}} [[T2]])
495 // CHECK6: [[BC3:%[a-z0-9]+]] = bitcast %"struct.test11::S1"* [[T2]] to i8*
496 // CHECK6: call void @llvm.lifetime.end.p0i8(i64 32, i8* [[BC3]])
498 // CHECK6: call void @_ZN6test112S1D1Ev(%"struct.test11::S1"* {{[^,]*}} [[T2]])
499 // CHECK6: [[BC4:%[a-z0-9]+]] = bitcast %"struct.test11::S1"* [[T2]] to i8*
500 // CHECK6: call void @llvm.lifetime.end.p0i8(i64 32, i8* [[BC4]])
502 // CHECK6: {{^}}invoke.cont
503 // CHECK6: call void @_ZN6test112S1D1Ev(%"struct.test11::S1"* {{[^,]*}} [[T3]])
504 // CHECK6: [[BC5:%[a-z0-9]+]] = bitcast %"struct.test11::S1"* [[T3]] to i8*
505 // CHECK6: call void @llvm.lifetime.end.p0i8(i64 32, i8* [[BC5]])
507 // CHECK6: call void @_ZN6test112S1D1Ev(%"struct.test11::S1"* {{[^,]*}} [[T3]])
508 // CHECK6: [[BC6:%[a-z0-9]+]] = bitcast %"struct.test11::S1"* [[T3]] to i8*
509 // CHECK6: call void @llvm.lifetime.end.p0i8(i64 32, i8* [[BC6]])
516 void func1(S1
&) noexcept(false);
518 void testLifetimeEnd(int n
) {
522 } else if (n
< 100) {
525 } else if (n
< 1000) {
533 namespace final_dtor
{
536 // CHECK6-LABEL: define {{.*}} @_ZN10final_dtor1AD2Ev(
537 // CHECK6: store {{.*}} @_ZTV
538 // CHECK6-LABEL: {{^}}}
539 virtual ~A() { f(); }
542 // CHECK6-LABEL: define {{.*}} @_ZN10final_dtor1BD2Ev(
543 // CHECK6: store {{.*}} @_ZTV
544 // CHECK6-LABEL: {{^}}}
545 virtual ~B() { f(); }
548 // CHECK6-LABEL: define {{.*}} @_ZN10final_dtor1CD2Ev(
549 // CHECK6-NOT: store {{.*}} @_ZTV
550 // CHECK6-LABEL: {{^}}}
551 virtual ~C() { f(); }
554 // CHECK6-LABEL: define {{.*}} @_ZN10final_dtor1DD2Ev(
555 // CHECK6-NOT: store {{.*}} @_ZTV
556 // CHECK6-LABEL: {{^}}}
557 virtual ~D() final
{ f(); }