[Lldb-commits] [lldb] r137167 - /lldb/trunk/source/Symbol/ClangASTType.cpp

Sean Callanan scallanan at apple.com
Tue Aug 9 15:42:51 PDT 2011


Author: spyffe
Date: Tue Aug  9 17:42:51 2011
New Revision: 137167

URL: http://llvm.org/viewvc/llvm-project?rev=137167&view=rev
Log:
Fixed the type code to print "<invalid>" for NULL
types instead of letting Clang crash.

Modified:
    lldb/trunk/source/Symbol/ClangASTType.cpp

Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=137167&r1=137166&r2=137167&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Tue Aug  9 17:42:51 2011
@@ -123,6 +123,9 @@
 ConstString
 ClangASTType::GetConstTypeName (clang_type_t clang_type)
 {
+    if (!clang_type)
+        return ConstString("<invalid>");
+    
     clang::QualType qual_type(clang::QualType::getFromOpaquePtr(clang_type));
     std::string type_name (GetTypeNameForQualType (qual_type));
     ConstString const_type_name;





More information about the lldb-commits mailing list