[Lldb-commits] [lldb] r151541 - /lldb/trunk/source/Expression/ClangASTSource.cpp

Sean Callanan scallanan at apple.com
Mon Feb 27 11:22:39 PST 2012


Author: spyffe
Date: Mon Feb 27 13:22:39 2012
New Revision: 151541

URL: http://llvm.org/viewvc/llvm-project?rev=151541&view=rev
Log:
Harden the checks on the type returned from the
AST importer because we're seeing occasional
crashes.

Modified:
    lldb/trunk/source/Expression/ClangASTSource.cpp

Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=151541&r1=151540&r2=151541&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Mon Feb 27 13:22:39 2012
@@ -1300,6 +1300,11 @@
     
     SetImportInProgress(false);
     
+    if (ret_qual_type->getCanonicalTypeInternal().isNull()) 
+        // this shouldn't happen, but we're hardening because the AST importer seems to be generating bad types
+        // on occasion.
+        return NULL;
+    
     return ret;
 }
 





More information about the lldb-commits mailing list