================
@@ -2800,6 +2802,19 @@ void CodeGenModule::ConstructAttributeList(StringRef
Name,
.getAsAlign();
Attrs.addAlignmentAttr(Alignment);
+ const auto *DD = dyn_cast_if_present<CXXDestructorDecl>(
+ CalleeInfo.getCalleeDecl().getDecl());
+ if (DD && CodeGenOpts.MarkObjectsDeadAfterDestructors) {
+ const CXXRecordDecl *ClassDecl =
+ dyn_cast<CXXRecordDecl>(DD->getDeclContext());
+ // TODO(boomanaiden154): We are being intentionally conservative here
+ // as we gain experience with this optimization. These checks should be
+ // removed once we have done further integration testing.
+ if (ClassDecl->getNumBases() == 0 && ClassDecl->getNumVBases() == 0) {
----------------
antoniofrighetto wrote:
Braces not needed.
https://github.com/llvm/llvm-project/pull/166276
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits