[PATCH] D30131: [profiling] Don't skip non-base constructors if there is a virtual base (fixes PR31992)
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 17 19:04:08 PST 2017
vsk created this revision.
We don't assign profile counters to non-base constructors. That results
in a loss coverage for constructors in classes with virtual bases, which
are complete constructors.
Make an exception for non-base constructors in classes with virtual
bases.
I checked that we get a proper code coverage report for both tests.
@Alex, after I finished drafting this patch I noticed that you recommended using IsConstructorDelegationValid(), but imo that predicate seems a little hacked-up. Wdyt of starting with the virtual bases case, and then checking if there's anything else left?
https://reviews.llvm.org/D30131
Files:
lib/CodeGen/CodeGenPGO.cpp
test/Profile/Inputs/cxx-class.proftext
test/Profile/cxx-class.cpp
test/Profile/cxx-structors.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30131.89006.patch
Type: text/x-patch
Size: 4431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170218/7e33dc4d/attachment-0001.bin>
More information about the cfe-commits
mailing list