From 16f45ca6ba2ce662e4f8a02f6904bbf7f5019768 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Wed, 1 May 2013 23:18:34 +0000 Subject: [PATCH] Make our eliding of artificially-generated methods in debug information more aggressive. Emitting classes containing these methods causes crashes in Clang when dealing with complex code bases. llvm-svn: 180895 --- lldb/source/Symbol/ClangASTContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index cf16799570e4..b2e98c26a8d6 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -1769,6 +1769,9 @@ ClangASTContext::AddMethodToCXXRecordType CXXDestructorDecl *cxx_dtor_decl(NULL); CXXConstructorDecl *cxx_ctor_decl(NULL); + if (is_artificial) + return NULL; // skip everything artificial + if (name[0] == '~') { cxx_dtor_decl = CXXDestructorDecl::Create (*ast, @@ -1783,9 +1786,6 @@ ClangASTContext::AddMethodToCXXRecordType } else if (decl_name == cxx_record_decl->getDeclName()) { - if (is_artificial && method_function_prototype->getNumArgs() == 1) - return NULL; // skip artificial copy constructors - cxx_ctor_decl = CXXConstructorDecl::Create (*ast, cxx_record_decl, SourceLocation(),