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.
<rdar://problem/12640887>
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180895 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/ClangASTContext.cpp b/source/Symbol/ClangASTContext.cpp
index cf16799..b2e98c2 100644
--- a/source/Symbol/ClangASTContext.cpp
+++ b/source/Symbol/ClangASTContext.cpp
@@ -1769,6 +1769,9 @@
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 @@
}
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(),