2016-02-05 02:39:09 +08:00
|
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -main-file-name cxx-virtual-destructor-calls.cpp %s -o - -fprofile-instrument=clang | FileCheck %s
|
2015-05-21 00:16:23 +08:00
|
|
|
|
|
|
|
struct Member {
|
|
|
|
~Member();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct A {
|
|
|
|
virtual ~A();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct B : A {
|
|
|
|
Member m;
|
|
|
|
virtual ~B();
|
|
|
|
};
|
|
|
|
|
2015-12-06 22:32:39 +08:00
|
|
|
// Base dtor counters and profile data
|
2019-02-11 04:17:07 +08:00
|
|
|
// CHECK: @__profc__ZN1BD2Ev = {{(private|internal)}} global [1 x i64] zeroinitializer
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK: @__profd__ZN1BD2Ev =
|
2015-12-06 22:32:39 +08:00
|
|
|
|
|
|
|
// Complete dtor counters and profile data must absent
|
2019-02-11 04:17:07 +08:00
|
|
|
// CHECK-NOT: @__profc__ZN1BD1Ev = {{(private|internal)}} global [1 x i64] zeroinitializer
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK-NOT: @__profd__ZN1BD1Ev =
|
2015-12-06 22:32:39 +08:00
|
|
|
|
|
|
|
// Deleting dtor counters and profile data must absent
|
2019-02-11 04:17:07 +08:00
|
|
|
// CHECK-NOT: @__profc__ZN1BD0Ev = {{(private|internal)}} global [1 x i64] zeroinitializer
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK-NOT: @__profd__ZN1BD0Ev =
|
2015-05-21 00:16:23 +08:00
|
|
|
|
|
|
|
B::~B() { }
|