You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
687 B
33 lines
687 B
// Tests for instrumentation of C++ constructors and destructors.
|
|
//
|
|
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c++ %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
|
|
|
|
struct Foo {
|
|
Foo() {}
|
|
Foo(int) {}
|
|
~Foo() {}
|
|
};
|
|
|
|
struct Bar : public Foo {
|
|
Bar() {}
|
|
Bar(int x) : Foo(x) {}
|
|
~Bar();
|
|
};
|
|
|
|
Foo foo;
|
|
Foo foo2(1);
|
|
Bar bar;
|
|
|
|
// Profile data for complete constructors and destructors must absent.
|
|
|
|
// CHECK-NOT: @__profn__ZN3FooC1Ev
|
|
// CHECK-NOT: @__profn__ZN3FooC1Ei
|
|
// CHECK-NOT: @__profn__ZN3FooD1Ev
|
|
// CHECK-NOT: @__profn__ZN3BarC1Ev
|
|
// CHECK-NOT: @__profn__ZN3BarD1Ev
|
|
// CHECK-NOT: @__profc__ZN3FooD1Ev
|
|
// CHECK-NOT: @__profd__ZN3FooD1Ev
|
|
|
|
int main() {
|
|
}
|