1 // Tests for instrumentation of C++ constructors and destructors.
3 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c++ %s -o %t -emit-llvm -fprofile-instrument=clang
4 // RUN: FileCheck %s -input-file=%t -check-prefix=INSTR
5 // RUN: FileCheck %s -input-file=%t -check-prefix=NOINSTR
13 struct Bar
: public Foo
{
15 Bar(int x
) : Foo(x
) {}
19 struct Baz
: virtual public Foo
{
21 Baz(int x
) : Foo(x
) {}
25 struct Quux
: public Foo
{
26 Quux(const char *y
, ...) : Foo(0) {}
34 Quux
qux("fi", "fo", "fum");
36 // Profile data for complete constructors and destructors must be absent.
38 // INSTR: @__profc__ZN3BazC1Ev =
39 // INSTR: @__profc__ZN3BazC1Ei =
40 // INSTR: @__profc__ZN4QuuxC1EPKcz =
41 // INSTR: @__profc_main =
42 // INSTR: @__profc__ZN3FooC2Ev =
43 // INSTR: @__profc__ZN3FooD2Ev =
44 // INSTR: @__profc__ZN3FooC2Ei =
45 // INSTR: @__profc__ZN3BarC2Ev =
47 // NOINSTR-NOT: @__profc__ZN3FooC1Ev
48 // NOINSTR-NOT: @__profc__ZN3FooC1Ei
49 // NOINSTR-NOT: @__profc__ZN3FooD1Ev
50 // NOINSTR-NOT: @__profc__ZN3BarC1Ev
51 // NOINSTR-NOT: @__profc__ZN3BarD1Ev
52 // NOINSTR-NOT: @__profc__ZN3FooD1Ev