[Lldb-commits] [PATCH] D12963: Eliminate a potential crash in	the struct layout code with a gracefull fallback
    Tamas Berghammer via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Fri Sep 25 05:52:33 PDT 2015
    
    
  
This revision was automatically updated to reflect the committed changes.
Closed by commit rL248571: Eliminate a potential crash in the struct layout code with a gracefull fallback (authored by tberghammer).
Changed prior to commit:
  http://reviews.llvm.org/D12963?vs=35084&id=35717#toc
Repository:
  rL LLVM
http://reviews.llvm.org/D12963
Files:
  lldb/trunk/source/Expression/ClangASTSource.cpp
Index: lldb/trunk/source/Expression/ClangASTSource.cpp
===================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp
+++ lldb/trunk/source/Expression/ClangASTSource.cpp
@@ -1674,7 +1674,8 @@
 
     ClangASTContext::GetCompleteDecl(&origin_record->getASTContext(), const_cast<RecordDecl*>(origin_record.decl));
 
-    if (!origin_record.decl->getDefinition())
+    clang::RecordDecl* definition = origin_record.decl->getDefinition();
+    if (!definition || !definition->isCompleteDefinition())
         return false;
 
     const ASTRecordLayout &record_layout(origin_record->getASTContext().getASTRecordLayout(origin_record.decl));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12963.35717.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150925/4d3a8176/attachment.bin>
    
    
More information about the lldb-commits
mailing list