[PATCH] D30131: [profiling] Don't skip non-base constructors if there is a virtual base (fixes PR31992)
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 17 19:15:22 PST 2017
arphaman added inline comments.
================
Comment at: lib/CodeGen/CodeGenPGO.cpp:631
+ ((isa<CXXConstructorDecl>(D) && GD.getCtorType() != Ctor_Base &&
+ !cast<CXXConstructorDecl>(D)->getParent()->getNumVBases()) ||
(isa<CXXDestructorDecl>(D) && GD.getDtorType() != Dtor_Base))) {
----------------
I think it would be more appropriate to use the `IsConstructorDelegationValid` static function from `CGClass.cpp` instead of using the `numVBases` check, as some virtual inheritance constructors might get delegated in the future (as stated in the comments inside of `IsConstructorDelegationValid`).
https://reviews.llvm.org/D30131
More information about the cfe-commits
mailing list