diff options
author | Vedant Kumar <vsk@apple.com> | 2017-02-24 01:15:19 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-02-24 01:15:19 +0000 |
commit | 7f809b2fbd0c3a0fee44e3805955a1b0c76f3ce1 (patch) | |
tree | ef1505d7c247c6e46721fc520b3de6b6e814c6ad /clang/test/Profile/cxx-structors.cpp | |
parent | d75fd0988d1e8f2393363ebdd31fc0325a4ba82a (diff) | |
download | bcm5719-llvm-7f809b2fbd0c3a0fee44e3805955a1b0c76f3ce1.tar.gz bcm5719-llvm-7f809b2fbd0c3a0fee44e3805955a1b0c76f3ce1.zip |
[profiling] PR31992: Don't skip interesting non-base constructors
Fix the fact that we don't assign profile counters to constructors in
classes with virtual bases, or constructors with variadic parameters.
Differential Revision: https://reviews.llvm.org/D30131
llvm-svn: 296062
Diffstat (limited to 'clang/test/Profile/cxx-structors.cpp')
-rw-r--r-- | clang/test/Profile/cxx-structors.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Profile/cxx-structors.cpp b/clang/test/Profile/cxx-structors.cpp index 578fc308bcc..8e0fac163d9 100644 --- a/clang/test/Profile/cxx-structors.cpp +++ b/clang/test/Profile/cxx-structors.cpp @@ -16,12 +16,28 @@ struct Bar : public Foo { ~Bar(); }; +struct Baz : virtual public Foo { + Baz() {} + Baz(int x) : Foo(x) {} + ~Baz(); +}; + +struct Quux : public Foo { + Quux(const char *y, ...) : Foo(0) {} +}; + Foo foo; Foo foo2(1); Bar bar; +Baz baz; +Baz baz2(1); +Quux qux("fi", "fo", "fum"); // Profile data for complete constructors and destructors must absent. +// INSTR: @__profc__ZN3BazC1Ev = +// INSTR: @__profc__ZN3BazC1Ei = +// INSTR: @__profc__ZN4QuuxC1EPKcz = // INSTR: @__profc_main = // INSTR: @__profc__ZN3FooC2Ev = // INSTR: @__profc__ZN3FooD2Ev = |