From dc968d1665b6b218bd0c2fbdf9f8afe41f9413dc Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 17 May 2011 18:15:05 +0000 Subject: [PATCH] Fixed an assert that could cause a crash when there was an unrecognized DW_TAG_base_type. Now it is a error printed to stderr. llvm-svn: 131473 --- lldb/source/Symbol/ClangASTContext.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 3797769f6f26..9695fdce3f12 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -862,7 +862,14 @@ ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize (const char *type_name } // This assert should fire for anything that we don't catch above so we know // to fix any issues we run into. - assert (!"error: ClangASTContext::GetClangTypeForDWARFEncodingAndSize() contains an unhandled encoding. Fix this ASAP!"); + if (type_name) + { + fprintf (stderr, "error: need to add support for DW_TAG_base_type '%s' encoded with DW_ATE = 0x%x, bit_size = %u\n", type_name, dw_ate, bit_size); + } + else + { + fprintf (stderr, "error: need to add support for DW_TAG_base_type encoded with DW_ATE = 0x%x, bit_size = %u\n", dw_ate, bit_size); + } return NULL; }