1 // Tests for instrumentation of C++ constructors and destructors. 2 // 3 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c++ %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s 4 5 struct Foo { 6 Foo() {} 7 Foo(int) {} 8 ~Foo() {} 9 }; 10 11 struct Bar : public Foo { 12 Bar() {} 13 Bar(int x) : Foo(x) {} 14 ~Bar(); 15 }; 16 17 Foo foo; 18 Foo foo2(1); 19 Bar bar; 20 21 // Profile data for complete constructors and destructors must absent. 22 23 // CHECK-NOT: @__profn__ZN3FooC1Ev 24 // CHECK-NOT: @__profn__ZN3FooC1Ei 25 // CHECK-NOT: @__profn__ZN3FooD1Ev 26 // CHECK-NOT: @__profn__ZN3BarC1Ev 27 // CHECK-NOT: @__profn__ZN3BarD1Ev 28 // CHECK-NOT: @__profc__ZN3FooD1Ev 29 // CHECK-NOT: @__profd__ZN3FooD1Ev 30 31 int main() { 32 } 33