Files
clang-p2996/clang/test/Profile/cxx-structors.cpp
Rong Xu 9837ef56b4 [PGO] cc1 option name change for profile instrumentation
This patch changes cc1 option -fprofile-instr-generate to an enum option
-fprofile-instrument={clang|none}. It also changes cc1 options
-fprofile-instr-generate= to -fprofile-instrument-path=.
The driver level option -fprofile-instr-generate and -fprofile-instr-generate=
remain intact. This change will pave the way to integrate new PGO
instrumentation in IR level.

Review: http://reviews.llvm.org/D16730
llvm-svn: 259811
2016-02-04 18:39:09 +00:00

33 lines
687 B
C++

// 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() {
}