You have to call setHasLoadedFieldsFromExternalStorage AFTER calling
authorJim Ingham <jingham@apple.com>
Wed, 4 May 2016 00:06:23 +0000 (00:06 +0000)
committerJim Ingham <jingham@apple.com>
Wed, 4 May 2016 00:06:23 +0000 (00:06 +0000)
the field_begin that starts the copy or it won't do anything.

This causes failures, but only in complex apps, I haven't found
a reduced test case for this yet.

<rdar://problem/21951798>

llvm-svn: 268467

lldb/source/Symbol/ClangASTContext.cpp

index 5905a9a..09265d3 100644 (file)
@@ -2618,8 +2618,8 @@ GetCompleteQualType (clang::ASTContext *ast, clang::QualType qual_type, bool all
                             external_ast_source->CompleteType(cxx_record_decl);
                             if (cxx_record_decl->isCompleteDefinition())
                             {
-                                cxx_record_decl->setHasLoadedFieldsFromExternalStorage (true);
                                 cxx_record_decl->field_begin();
+                                cxx_record_decl->setHasLoadedFieldsFromExternalStorage (true);
                             }
                         }
                     }