[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Profile / cxx-virtual-destructor-calls.cpp
blob03e1c1031f9ac1654869ff9dcfbbc823b24db790
1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -main-file-name cxx-virtual-destructor-calls.cpp %s -o - -fprofile-instrument=clang | FileCheck %s
3 struct Member {
4 ~Member();
5 };
7 struct A {
8 virtual ~A();
9 };
11 struct B : A {
12 Member m;
13 virtual ~B();
16 // Base dtor counters and profile data
17 // CHECK: @__profc__ZN1BD2Ev = {{(private|internal)}} global [1 x i64] zeroinitializer
18 // CHECK: @__profd__ZN1BD2Ev =
20 // Complete dtor counters and profile data must absent
21 // CHECK-NOT: @__profc__ZN1BD1Ev = {{(private|internal)}} global [1 x i64] zeroinitializer
22 // CHECK-NOT: @__profd__ZN1BD1Ev =
24 // Deleting dtor counters and profile data must absent
25 // CHECK-NOT: @__profc__ZN1BD0Ev = {{(private|internal)}} global [1 x i64] zeroinitializer
26 // CHECK-NOT: @__profd__ZN1BD0Ev =
28 B::~B() { }