svn commit: r271282 - head/contrib/llvm/tools/clang/lib/CodeGen
Ed Maste
emaste at FreeBSD.org
Mon Sep 8 18:43:34 UTC 2014
Author: emaste
Date: Mon Sep 8 18:43:33 2014
New Revision: 271282
URL: http://svnweb.freebsd.org/changeset/base/271282
Log:
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
Modified:
head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Mon Sep 8 18:11:20 2014 (r271281)
+++ head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Mon Sep 8 18:43:33 2014 (r271282)
@@ -2235,9 +2235,10 @@ llvm::DICompositeType CGDebugInfo::Creat
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);
More information about the svn-src-all
mailing list