| 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 counters and profile data |
| 17 |
// CHECK: @__profc__ZN1BD2Ev = {{(private|internal)}} global [1 x i64] zeroinitializer |
| 18 |
// CHECK: @__profd__ZN1BD2Ev = |
| 19 |
|
| 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 = |
| 23 |
|
| 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 = |
| 27 |
|
| 28 |
B::~B() { } |