diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-04-26 23:37:38 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-04-26 23:37:38 +0000 |
commit | 0dabc2adbaffc2cb9b9ab8931e7fe92734c3f342 (patch) | |
tree | b8c1a4b1574bc7bc3fb36bd96dd628549d1a3169 /clang/lib | |
parent | 807e13379b0b0ce6262de5b4c9f9d778603691a7 (diff) | |
download | bcm5719-llvm-0dabc2adbaffc2cb9b9ab8931e7fe92734c3f342.tar.gz bcm5719-llvm-0dabc2adbaffc2cb9b9ab8931e7fe92734c3f342.zip |
Module debugging: Also correctly handle typedef'd foward-declared members.
Thanks again to Richard Smith for pointing this out.
llvm-svn: 267630
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 13 |
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; } |