diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-04-26 23:42:43 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-04-26 23:42:43 +0000 |
commit | 9491371f6ff345a820ff98e398b194604fd341dc (patch) | |
tree | 959b1232b0522ce0c02e4c23bc48770b7073e624 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | d49941b726815de509ff770227856f8d2a33992a (diff) | |
download | bcm5719-llvm-9491371f6ff345a820ff98e398b194604fd341dc.tar.gz bcm5719-llvm-9491371f6ff345a820ff98e398b194604fd341dc.zip |
Module debugging: Add an assertion.
llvm-svn: 267633
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e794aeeb169..b44ddc4d187 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1520,11 +1520,13 @@ static bool isDefinedInClangModule(const RecordDecl *RD) { return false; if (!RD->isExternallyVisible() && RD->getName().empty()) return false; - if (auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) + if (auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) { + assert(CXXDecl->isCompleteDefinition() && "incomplete record definition"); 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; } |