================
@@ -2504,6 +2504,19 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction(
if (Method->getCanonicalDecl()->isDeleted())
SPFlags |= llvm::DISubprogram::SPFlagDeleted;
+ const bool isExplicitlyDefaultable =
+ isa<CXXDestructorDecl>(Method) ||
+ (isa<CXXConstructorDecl>(Method) &&
+ cast<CXXConstructorDecl>(Method)->isDefaultConstructor()) ||
+ Method->isCopyOrMoveConstructorOrAssignment();
+ if (Method->isExplicitlyDefaulted())
+ SPFlags |= Method->isOutOfLine()
+ ? llvm::DISubprogram::SPFlagDefaultedOutOfClass
+ : llvm::DISubprogram::SPFlagDefaultedInClass;
+ else if (isExplicitlyDefaultable && !Method->isImplicit() &&
----------------
bulbazord wrote:
I think it should be `isImplicit` because we don't want to emit any attributes
for artificial (i.e. compiler-generated) constructors/destructors.
https://github.com/llvm/llvm-project/pull/213188
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits