labath added a comment. Thanks for splitting this up. This does make things much easier to understand.
I don't have any real objections to this, but I have some "thoughts" in inline comments. ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:214-215 &pcm_type_sp->GetDeclaration(), type, Type::ResolveState::Forward)); + TypePayloadClang(type_sp->GetPayload()) + .SetOwningModuleID(GetOwningModuleID(die)); ---------------- Did you deliberately not include the payload as an argument to the Type constructor? I can understand not wanting to add a extra argument to that constructor, but OTOH, having this in the constructor would make it harder to forget setting the module id when creating a type elsewhere. (And it's always nice to have immutable members if it is possible.) ================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:221-237 + if (tag_decl) { + TypeSystemClang::SetOwningModule(tag_decl, owning_module); + if (auto *rd = llvm::dyn_cast<clang::RecordDecl>(tag_decl)) + for (clang::FieldDecl *fd : rd->fields()) + TypeSystemClang::SetOwningModule(fd, owning_module); + if (auto *ed = llvm::dyn_cast<clang::EnumDecl>(tag_decl)) + for (clang::EnumConstantDecl *ecd : ed->enumerators()) ---------------- I don't know how feasible this is, but it has occurred to me that this is basically repeating the same structure iteration that would be done as a part of the import a couple of lines above. If would be nice if the importer could somehow set this property automatically. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75488/new/ https://reviews.llvm.org/D75488 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits