diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 4dab595..126b239 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2489,9 +2489,18 @@ static bool canUseCtorHoming(const CXXRecordDecl *RD) { if (isClassOrMethodDLLImport(RD)) return false; - return !RD->isLambda() && !RD->isAggregate() && - !RD->hasTrivialDefaultConstructor() && - !RD->hasConstexprNonCopyMoveConstructor(); + if (RD->isLambda() || RD->isAggregate() || + RD->hasTrivialDefaultConstructor() || + RD->hasConstexprNonCopyMoveConstructor()) + return false; + + for (const CXXConstructorDecl *Ctor : RD->ctors()) { + if (Ctor->isCopyOrMoveConstructor()) + continue; + if (!Ctor->isDeleted()) + return true; + } + return false; } static bool shouldOmitDefinition(codegenoptions::DebugInfoKind DebugKind, |
