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
2
3 struct Member {
4 ~Member();
5 };
6
7 struct A {
8 virtual ~A();
9 };
10
11 struct B : A {
12 Member m;
13 virtual ~B();
14 };
15
16 // Base dtor
17 // CHECK: @__profn__ZN1BD2Ev = private constant [9 x i8] c"_ZN1BD2Ev"
18
19 // Complete dtor must not be instrumented
20 // CHECK-NOT: @__profn__ZN1BD1Ev = private constant [9 x i8] c"_ZN1BD1Ev"
21
22 // Deleting dtor must not be instrumented
23 // CHECK-NOT: @__profn__ZN1BD0Ev = private constant [9 x i8] c"_ZN1BD0Ev"
24
25 // Base dtor counters and profile data
26 // CHECK: @__profc__ZN1BD2Ev = private global [1 x i64] zeroinitializer
27 // CHECK: @__profd__ZN1BD2Ev =
28
29 // Complete dtor counters and profile data must absent
30 // CHECK-NOT: @__profc__ZN1BD1Ev = private global [1 x i64] zeroinitializer
31 // CHECK-NOT: @__profd__ZN1BD1Ev =
32
33 // Deleting dtor counters and profile data must absent
34 // CHECK-NOT: @__profc__ZN1BD0Ev = private global [1 x i64] zeroinitializer
35 // CHECK-NOT: @__profd__ZN1BD0Ev =
36
~B()37 B::~B() { }
38