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
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK: @__profn__ZN1BD2Ev = private constant [9 x i8] c"_ZN1BD2Ev"
|
2015-05-21 00:16:23 +08:00
|
|
|
|
2015-12-06 22:32:39 +08:00
|
|
|
// Complete dtor must not be instrumented
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK-NOT: @__profn__ZN1BD1Ev = private constant [9 x i8] c"_ZN1BD1Ev"
|
2015-05-21 00:16:23 +08:00
|
|
|
|
2015-12-06 22:32:39 +08:00
|
|
|
// Deleting dtor must not be instrumented
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK-NOT: @__profn__ZN1BD0Ev = private constant [9 x i8] c"_ZN1BD0Ev"
|
2015-05-21 00:16:23 +08:00
|
|
|
|
2015-12-06 22:32:39 +08:00
|
|
|
// Base dtor counters and profile data
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK: @__profc__ZN1BD2Ev = private global [1 x i64] zeroinitializer
|
|
|
|
// CHECK: @__profd__ZN1BD2Ev =
|
2015-12-06 22:32:39 +08:00
|
|
|
|
|
|
|
// Complete dtor counters and profile data must absent
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK-NOT: @__profc__ZN1BD1Ev = private global [1 x i64] zeroinitializer
|
|
|
|
// CHECK-NOT: @__profd__ZN1BD1Ev =
|
2015-12-06 22:32:39 +08:00
|
|
|
|
|
|
|
// Deleting dtor counters and profile data must absent
|
2015-12-15 08:33:12 +08:00
|
|
|
// CHECK-NOT: @__profc__ZN1BD0Ev = private global [1 x i64] zeroinitializer
|
|
|
|
// CHECK-NOT: @__profd__ZN1BD0Ev =
|
2015-05-21 00:16:23 +08:00
|
|
|
|
|
|
|
B::~B() { }
|