summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index e275f060dfd..e794aeeb169 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1520,13 +1520,12 @@ static bool isDefinedInClangModule(const RecordDecl *RD) {
return false;
if (!RD->isExternallyVisible() && RD->getName().empty())
return false;
- if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
- if (!CTSD->isCompleteDefinition())
- return false;
- // Make sure the instantiation is actually in a module.
- if (CTSD->field_begin() != CTSD->field_end())
- return CTSD->field_begin()->isFromASTFile();
- }
+ if (auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD))
+ if (CXXDecl->getTemplateSpecializationKind() != TSK_Undeclared)
+ // Make sure the instantiation is actually in a module.
+ if (CXXDecl->field_begin() != CXXDecl->field_end())
+ return CXXDecl->field_begin()->isFromASTFile();
+
return true;
}
OpenPOWER on IntegriCloud