Merge Clang debug info crash fix rev 200797:
Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 PR: 193347 MFC after: 3 days Sponsored by: DARPA, AFRL
This commit is contained in:
parent
a9ff4acab2
commit
2c123ad8b3
@ -2235,9 +2235,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
|
||||
if (T && (!T.isForwardDecl() || !RD->getDefinition()))
|
||||
return T;
|
||||
|
||||
// If this is just a forward declaration, construct an appropriately
|
||||
// marked node and just return it.
|
||||
if (!RD->getDefinition())
|
||||
// If this is just a forward or incomplete declaration, construct an
|
||||
// appropriately marked node and just return it.
|
||||
const RecordDecl *D = RD->getDefinition();
|
||||
if (!D || !D->isCompleteDefinition())
|
||||
return getOrCreateRecordFwdDecl(Ty, RDContext);
|
||||
|
||||
uint64_t Size = CGM.getContext().getTypeSize(Ty);
|
||||
|
Loading…
x
Reference in New Issue
Block a user