Lines Matching full:die
94 static bool IsClangModuleFwdDecl(const DWARFDIE &Die) {
95 if (!Die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
97 auto Parent = Die.GetParent();
106 static DWARFDIE GetContainingClangModuleDIE(const DWARFDIE &die) {
107 if (die.IsValid()) {
109 // Now make sure this DIE is scoped in a DW_TAG_module tag and return true
111 for (DWARFDIE parent = die.GetParent(); parent.IsValid();
125 static lldb::ModuleSP GetContainingClangModule(const DWARFDIE &die) {
126 if (die.IsValid()) {
127 DWARFDIE clang_module_die = GetContainingClangModuleDIE(die);
132 return die.GetDWARF()->GetExternalModule(
160 const DWARFDIE &die,
162 ModuleSP clang_module_sp = GetContainingClangModule(die);
169 std::vector<lldb_private::CompilerContext> die_context = die.GetDeclContext();
175 query.AddLanguage(SymbolFileDWARF::GetLanguageFamily(*die.GetCU()));
183 auto &sym_file = die.GetCU()->GetSymbolFileDWARF();
200 // it and cache the fact that we found a complete type for this die.
221 SymbolFileDWARF *dwarf = die.GetDWARF();
223 die.GetID(), pcm_type_sp->GetName(), pcm_type_sp->GetByteSize(nullptr),
226 TypePayloadClang(GetOwningClangModule(die)));
229 LinkDeclContextToDIE(tag_decl, die);
231 clang::DeclContext *defn_decl_ctx = GetCachedClangDeclContextForDIE(die);
233 LinkDeclContextToDIE(defn_decl_ctx, die);
246 DWARFDIE die,
265 die.GetDWARF()->GetObjectFile()->GetModule()->ReportError(
266 "Unable to complete the Decl context for DIE {0} at offset "
268 type_name_cstr ? type_name_cstr : "", die.GetOffset());
283 ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) {
284 DWARFAttributes attributes = die.GetAttributes();
331 // die.GetCU() can differ if DW_AT_specification uses DW_FORM_ref_addr.
424 static std::string GetUnitName(const DWARFDIE &die) {
425 if (DWARFUnit *unit = die.GetCU())
431 const DWARFDIE &die,
436 if (!die)
441 SymbolFileDWARF *dwarf = die.GetDWARF();
445 GetClangDeclContextContainingDIE(die, &context_die);
450 "(die = {0:x16}, decl_ctx = {1:p} (die "
452 die.GetOffset(), static_cast<void *>(context), context_die.GetOffset(),
453 DW_TAG_value_to_name(die.Tag()), die.Tag(), die.GetName());
458 dwarf->GetDIEToType().try_emplace(die.GetDIE(), DIE_IS_BEING_PARSED);
465 ParsedDWARFTypeAttributes attrs(die);
473 LinkDeclContextToDIE(decl_ctx, die);
479 const dw_tag_t tag = die.Tag();
493 type_sp = ParseTypeModifier(sc, die, attrs);
498 type_sp = ParseStructureLikeDIE(sc, die, attrs);
501 type_sp = ParseEnum(sc, die, attrs);
506 type_sp = ParseSubroutine(die, attrs);
509 type_sp = ParseArrayType(die, attrs);
512 type_sp = ParsePointerToMemberType(die, attrs);
519 die.GetOffset(), tag, DW_TAG_value_to_name(tag));
522 UpdateSymbolContextScopeForType(sc, die, type_sp);
525 dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
531 ExtractDataMemberLocation(DWARFDIE const &die, DWARFFormValue const &form_value,
542 const DWARFDataExtractor &debug_info_data = die.GetData();
550 DataExtractor(debug_info_data, block_offset, block_length), die.GetCU(),
561 static TypePayloadClang GetPtrAuthMofidierPayload(const DWARFDIE &die) {
563 return die.GetAttributeValueAsUnsigned(Attr, defaultValue);
584 die.GetDWARF()->GetObjectFile()->GetModule()->ReportError(
586 die.GetOffset(), authentication_mode_int);
596 const DWARFDIE &die,
599 SymbolFileDWARF *dwarf = die.GetDWARF();
600 const dw_tag_t tag = die.Tag();
601 LanguageType cu_language = SymbolFileDWARF::GetLanguage(*die.GetCU());
604 TypePayloadClang payload(GetOwningClangModule(die));
613 GetClangDeclContextContainingDIE(die, nullptr), die,
642 // First make sure that the die that this is typedef'ed to _is_
649 type_sp = ParseTypeFromClangModule(sc, die, log);
656 DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\") type => 0x%8.8lx\n", die.GetID(),
704 payload = GetPtrAuthMofidierPayload(die);
714 DWARFDIE target_die = die.GetReferencedDIE(DW_AT_type);
756 "SymbolFileDWARF::ParseType (die = {0:x16}) {1} ({2}) '{3}' "
758 die.GetOffset(), DW_TAG_value_to_name(die.Tag()), die.Tag(),
759 die.GetName());
768 "SymbolFileDWARF::ParseType (die = {0:x16}) {1} ({2}) '{3}' "
770 die.GetOffset(), DW_TAG_value_to_name(die.Tag()), die.Tag(),
771 die.GetName());
780 "SymbolFileDWARF::ParseType (die = {0:x16}) {1} ({2}) '{3}' "
782 die.GetOffset(), DW_TAG_value_to_name(die.Tag()), die.Tag(),
783 die.GetName());
802 "SymbolFileDWARF::ParseType (die = {0:x16}) {1} ({2}) '{3}' "
804 die.GetOffset(), DW_TAG_value_to_name(die.Tag()), die.Tag(),
805 die.GetName());
816 return dwarf->MakeType(die.GetID(), attrs.name, attrs.byte_size, nullptr,
822 DWARFASTParserClang::GetDIEClassTemplateParams(const DWARFDIE &die) {
823 if (llvm::StringRef(die.GetName()).contains("<"))
827 if (ParseTemplateParameterInfos(die, template_param_infos))
888 "forward declaration, complete DIE is {5}",
904 // No definition found. Proceed with the declaration die. We can use it to
942 // Declaration DIE is inserted into the type map in ParseTypeFromDWARF
956 "DWARF DIE at {0:x16} named \"{1}\" was not able to start its "
995 const ObjCLanguage::MethodName &objc_method, const DWARFDIE &die,
998 SymbolFileDWARF *dwarf = die.GetDWARF();
1001 const auto tag = die.Tag();
1031 die.GetOffset(), tag, DW_TAG_value_to_name(tag));
1035 LinkDeclContextToDIE(objc_method_decl, die);
1036 m_ast.SetMetadataAsUserID(objc_method_decl, die.GetID());
1042 const DWARFDIE &die, CompilerType clang_type,
1046 SymbolFileDWARF *dwarf = die.GetDWARF();
1058 // "decl_ctx_die" to DIEs in the DIE for "class_type"...
1070 Type *type_ptr = dwarf->GetDIEToType().lookup(die.GetDIE());
1084 // die.
1089 LinkDeclContextToDIE(spec_clang_decl_ctx, die);
1094 die.GetID(), spec_die.GetOffset());
1109 LinkDeclContextToDIE(abs_clang_decl_ctx, die);
1114 die.GetID(), abs_die.GetOffset());
1125 TypeSystemClang::GetDeclContextForType(class_opaque_type), die,
1131 if (!is_static && !die.HasChildren())
1148 LinkDeclContextToDIE(cxx_method_decl, die);
1151 metadata.SetUserID(die.GetID());
1173 DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
1177 SymbolFileDWARF *dwarf = die.GetDWARF();
1178 const dw_tag_t tag = die.Tag();
1186 DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
1207 GetClangDeclContextContainingDIE(die, &decl_ctx_die);
1219 if (die.HasChildren()) {
1221 ParseChildParameters(containing_decl_ctx, die, skip_artificial, is_static,
1230 // the DW_TAG_subprogram DIE, then we can't let this become a method in
1260 ParseObjCMethod(*objc_method, die, clang_type, attrs, is_variadic);
1263 ParseCXXMethod(die, clang_type, attrs, decl_ctx_die, is_static,
1284 LinkDeclContextToDIE(function_decl, die);
1308 GetOwningClangModule(die), name, clang_type, attrs.storage,
1314 ParseTemplateParameterInfos(die, template_param_infos);
1318 GetOwningClangModule(die), attrs.name.GetStringRef(), clang_type,
1322 containing_decl_ctx, GetOwningClangModule(die),
1345 LinkDeclContextToDIE(function_decl, die);
1355 metadata.SetUserID(die.GetID());
1372 die.GetID(), attrs.name, std::nullopt, nullptr, LLDB_INVALID_UID,
1377 DWARFASTParserClang::ParseArrayType(const DWARFDIE &die,
1379 SymbolFileDWARF *dwarf = die.GetDWARF();
1381 DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
1390 std::optional<SymbolFile::ArrayInfo> array_info = ParseChildArrayInfo(die);
1422 dwarf->MakeType(die.GetID(), empty_name, array_element_bit_stride / 8,
1427 m_ast.SetMetadataAsUserID(type, die.GetID());
1432 const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs) {
1433 SymbolFileDWARF *dwarf = die.GetDWARF();
1451 return dwarf->MakeType(die.GetID(), attrs.name, *clang_type_size, nullptr,
1459 const DWARFDIE &die, const DWARFDIE &parent_die,
1470 DWARFAttributes attributes = die.GetAttributes();
1490 ExtractDataMemberLocation(die, form_value, module_sp))
1509 Type *base_class_type = die.ResolveTypeUID(encoding_form.Reference());
1516 die.GetOffset(),
1558 const SymbolContext &sc, const DWARFDIE &die, TypeSP type_sp) {
1562 DWARFDIE sc_parent_die = SymbolFileDWARF::GetParentSymbolContextDIE(die);
1584 const lldb_private::plugin::dwarf::DWARFDIE &die,
1590 if (!die.IsValid() || !Language::LanguageIsCPlusPlus(language) ||
1595 DWARFDIE parent_decl_ctx_die = die.GetParentDeclContextDIE();
1637 qualified_name.append(GetDIEClassTemplateParams(die));
1644 const DWARFDIE &die,
1647 const dw_tag_t tag = die.Tag();
1648 SymbolFileDWARF *dwarf = die.GetDWARF();
1649 LanguageType cu_language = SymbolFileDWARF::GetLanguage(*die.GetCU());
1656 !die.HasChildren() && cu_language == eLanguageTypeObjC) {
1671 GetUniqueTypeNameAndDeclaration(die, cu_language, unique_typename,
1675 unique_typename, die, unique_decl, byte_size,
1678 dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
1680 GetCachedClangDeclContextForDIE(unique_ast_entry_type->m_die), die);
1681 // If the DIE being parsed in this function is a definition and the
1683 // to point to the definition DIE.
1686 unique_ast_entry_type->UpdateToDefDIE(die, unique_decl, byte_size);
1693 *die.GetDIERef());
1700 DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
1719 die.Supports_DW_AT_APPLE_objc_complete_type()) {
1722 // and this DIE isn't the complete definition (we checked
1726 dwarf->FindCompleteObjCDefinitionTypeForDIE(die, attrs.name, true);
1734 die, attrs.name, true);
1744 static_cast<void *>(this), die.GetID(), DW_TAG_value_to_name(tag),
1754 TypeSP type_sp = ParseTypeFromClangModule(sc, die, log);
1762 GetClangDeclContextContainingDIE(die, nullptr);
1765 containing_decl_ctx, die,
1778 metadata.SetUserID(die.GetID());
1779 metadata.SetIsDynamicCXXType(dwarf->ClassOrStructIsVirtual(die));
1782 if (ParseTemplateParameterInfos(die, template_param_infos)) {
1785 containing_decl_ctx, GetOwningClangModule(die), attrs.accessibility,
1793 static_cast<void *>(this), die.GetID(), DW_TAG_value_to_name(tag),
1801 containing_decl_ctx, GetOwningClangModule(die), class_template_decl,
1812 containing_decl_ctx, GetOwningClangModule(die), attrs.accessibility,
1818 die.GetID(), attrs.name, attrs.byte_size, nullptr, LLDB_INVALID_UID,
1828 LinkDeclContextToDIE(type_decl_ctx, die);
1839 unique_ast_entry_up->m_die = die;
1855 *die.GetDIERef())
1943 const DWARFDIE &die,
1945 const dw_tag_t tag = die.Tag();
1952 for (DWARFDIE child_die : die.children()) {
1956 if (const char *name = die.GetName()) {
1966 DWARFAttributes attributes = die.GetAttributes();
1993 Type *lldb_type = die.ResolveTypeUID(form_value.Reference());
2063 for (DWARFDIE die : parent_die.children()) {
2064 const dw_tag_t tag = die.Tag();
2071 ParseTemplateDIE(die, template_param_infos);
2083 bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die,
2086 const dw_tag_t tag = die.Tag();
2087 SymbolFileDWARF *dwarf = die.GetDWARF();
2092 if (die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
2115 ParseChildMembers(die, clang_type, bases, member_function_dies,
2120 for (const DWARFDIE &die : member_function_dies)
2121 dwarf->ResolveType(die);
2158 die.GetAttributeValueAsUnsigned(DW_AT_byte_size, 0) * 8;
2161 die.GetAttributeValueAsUnsigned(llvm::dwarf::DW_AT_alignment, 0) * 8;
2172 for (const DWARFDIE &die : contained_type_dies)
2173 dwarf->ResolveType(die);
2178 bool DWARFASTParserClang::CompleteEnumType(const DWARFDIE &die,
2182 if (die.HasChildren()) {
2186 type->GetByteSize(nullptr).value_or(0), die);
2193 bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die,
2196 SymbolFileDWARF *dwarf = die.GetDWARF();
2205 if (!die)
2208 const dw_tag_t tag = die.Tag();
2215 CompleteRecordType(die, type, clang_type);
2218 CompleteEnumType(die, type, clang_type);
2247 CompilerDecl DWARFASTParserClang::GetDeclForUIDFromDWARF(const DWARFDIE &die) {
2248 clang::Decl *clang_decl = GetClangDeclForDIE(die);
2255 DWARFASTParserClang::GetDeclContextForUIDFromDWARF(const DWARFDIE &die) {
2256 clang::DeclContext *clang_decl_ctx = GetClangDeclContextForDIE(die);
2263 DWARFASTParserClang::GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) {
2265 GetClangDeclContextContainingDIE(die, nullptr);
2279 for (DWARFDIE die : parent_die.children()) {
2280 const dw_tag_t tag = die.Tag();
2284 DWARFAttributes attributes = die.GetAttributes();
2338 DWARFASTParserClang::ConstructDemangledNameFromDWARF(const DWARFDIE &die) {
2347 DWARFDeclContext decl_ctx = die.GetDWARFDeclContext();
2351 GetClangDeclContextContainingDIE(die, nullptr);
2352 ParseChildParameters(containing_decl_ctx, die, true, is_static, is_variadic,
2372 const DWARFDIE &die,
2386 const dw_tag_t tag = die.Tag();
2391 if (die.GetDIENamesAndRanges(name, mangled, func_ranges, decl_file, decl_line,
2397 else if ((die.GetParent().Tag() == DW_TAG_compile_unit ||
2398 die.GetParent().Tag() == DW_TAG_partial_unit) &&
2400 SymbolFileDWARF::GetLanguage(*die.GetCU())) &&
2402 SymbolFileDWARF::GetLanguage(*die.GetCU())) &&
2407 func_name.SetValue(ConstructDemangledNameFromDWARF(die));
2415 die.GetCU()->GetFile(decl_file ? *decl_file : 0),
2418 SymbolFileDWARF *dwarf = die.GetDWARF();
2420 Type *func_type = dwarf->GetDIEToType().lookup(die.GetDIE());
2424 const user_id_t func_user_id = die.GetID();
2427 func_user_id, // UserID is the DIE offset
2445 explicit PropertyAttributes(const DWARFDIE &die);
2454 explicit DiscriminantValue(const DWARFDIE &die, ModuleSP module_sp);
2462 explicit VariantMember(DWARFDIE &die, ModuleSP module_sp);
2473 explicit VariantPart(const DWARFDIE &die, const DWARFDIE &parent_die,
2491 VariantMember::VariantMember(DWARFDIE &die, lldb::ModuleSP module_sp) {
2492 assert(die.Tag() == llvm::dwarf::DW_TAG_variant);
2494 die.GetAttributeValueAsOptionalUnsigned(DW_AT_discr_value);
2496 for (auto child_die : die.children()) {
2514 ExtractDataMemberLocation(die, form_value, module_sp))
2532 DiscriminantValue::DiscriminantValue(const DWARFDIE &die, ModuleSP module_sp) {
2533 auto referenced_die = die.GetReferencedDIE(DW_AT_discr);
2545 ExtractDataMemberLocation(die, form_value, module_sp))
2555 VariantPart::VariantPart(const DWARFDIE &die, const DWARFDIE &parent_die,
2557 : _members(), _discriminant(die, module_sp) {
2559 for (auto child : die.children()) {
2571 const DWARFDIE &die, const DWARFDIE &parent_die, ModuleSP module_sp) {
2572 DWARFAttributes attributes = die.GetAttributes();
2601 ExtractDataMemberLocation(die, form_value, module_sp))
2639 PropertyAttributes::PropertyAttributes(const DWARFDIE &die) {
2641 DWARFAttributes attributes = die.GetAttributes();
2702 const DWARFDIE &die, const DWARFDIE &parent_die,
2706 assert(die.Tag() == DW_TAG_APPLE_property);
2710 const MemberAttributes attrs(die, parent_die, module_sp);
2711 const PropertyAttributes propAttrs(die);
2715 die.GetID());
2719 Type *member_type = die.ResolveTypeUID(attrs.encoding_form.Reference());
2724 die.GetID(), propAttrs.prop_name,
2730 metadata.SetUserID(die.GetID());
2794 const DWARFDIE &die, const MemberAttributes &attrs,
2797 assert(die.Tag() == DW_TAG_member || die.Tag() == DW_TAG_variable);
2799 Type *var_type = die.ResolveTypeUID(attrs.encoding_form.Reference());
2833 const DWARFDIE &die, const DWARFDIE &parent_die,
2839 assert(die.Tag() == DW_TAG_member);
2842 const dw_tag_t tag = die.Tag();
2849 const MemberAttributes attrs(die, parent_die, module_sp);
2864 CreateStaticMemberVariable(die, attrs, class_clang_type);
2868 Type *member_type = die.ResolveTypeUID(attrs.encoding_form.Reference());
2874 die.GetID(), attrs.name, attrs.encoding_form.Reference().GetOffset());
2878 die.GetID(),
2907 ObjectFile *objfile = die.GetDWARF()->GetObjectFile();
2929 ObjectFile *objfile = die.GetDWARF()->GetObjectFile();
2935 die.GetID(), DW_TAG_value_to_name(tag), tag, attrs.name,
2950 die.GetCU()->Supports_unnamed_objc_bitfields();
3037 die.GetID(), attrs.name,
3053 m_ast.SetMetadataAsUserID(field_decl, die.GetID());
3078 for (DWARFDIE die : parent_die.children()) {
3079 dw_tag_t tag = die.Tag();
3083 ParseObjCProperty(die, parent_die, class_clang_type, delayed_properties);
3087 if (die.GetCU()->GetDWARFLanguageType() == eLanguageTypeRust) {
3088 ParseRustVariantPart(die, parent_die, class_clang_type,
3094 const MemberAttributes attrs(die, parent_die, module_sp);
3095 CreateStaticMemberVariable(die, attrs, class_clang_type);
3098 ParseSingleMember(die, parent_die, class_clang_type,
3104 member_function_dies.push_back(die);
3108 ParseInheritance(die, parent_die, class_clang_type, default_accessibility,
3114 contained_type_dies.push_back(die);
3132 for (DWARFDIE die : parent_die.children()) {
3133 const dw_tag_t tag = die.Tag();
3136 DWARFAttributes attributes = die.GetAttributes();
3187 // the formal parameter DIE...
3189 Type *this_type = die.ResolveTypeUID(param_type_die_form.Reference());
3206 Type *type = die.ResolveTypeUID(param_type_die_form.Reference());
3211 containing_decl_ctx, GetOwningClangModule(die), name,
3216 m_ast.SetMetadataAsUserID(param_var_decl, die.GetID());
3233 // ParseTemplateDIE (dwarf_cu, die, template_param_infos);
3244 clang::Decl *DWARFASTParserClang::GetClangDeclForDIE(const DWARFDIE &die) {
3245 if (!die)
3248 switch (die.Tag()) {
3255 // This means 'die' is a C++ static data member.
3258 if (auto parent = die.GetParent();
3266 DIEToDeclMap::iterator cache_pos = m_die_to_decl.find(die.GetDIE());
3270 if (DWARFDIE spec_die = die.GetReferencedDIE(DW_AT_specification)) {
3272 m_die_to_decl[die.GetDIE()] = decl;
3277 die.GetReferencedDIE(DW_AT_abstract_origin)) {
3279 m_die_to_decl[die.GetDIE()] = decl;
3284 switch (die.Tag()) {
3288 SymbolFileDWARF *dwarf = die.GetDWARF();
3289 Type *type = GetTypeForDIE(die);
3291 const char *name = die.GetName();
3294 dwarf->GetDeclContextContainingUID(die.GetID()));
3296 decl_context, GetOwningClangModule(die), name,
3302 SymbolFileDWARF *dwarf = die.GetDWARF();
3303 DWARFDIE imported_uid = die.GetAttributeValueAsReferenceDIE(DW_AT_import);
3309 dwarf->GetDeclContextContainingUID(die.GetID()));
3320 SymbolFileDWARF *dwarf = die.GetDWARF();
3321 DWARFDIE imported_uid = die.GetAttributeValueAsReferenceDIE(DW_AT_import);
3329 dwarf->GetDeclContextContainingUID(die.GetID()));
3343 m_die_to_decl[die.GetDIE()] = decl;
3349 DWARFASTParserClang::GetClangDeclContextForDIE(const DWARFDIE &die) {
3350 if (die) {
3351 clang::DeclContext *decl_ctx = GetCachedClangDeclContextForDIE(die);
3356 switch (die.Tag()) {
3364 decl_ctx = ResolveNamespaceDIE(die);
3369 decl_ctx = ResolveImportedDeclarationDIE(die);
3374 decl_ctx = GetDeclContextForBlock(die);
3383 Type *type = die.GetDWARF()->ResolveType(die);
3385 decl_ctx = GetCachedClangDeclContextForDIE(die);
3389 LinkDeclContextToDIE(decl_ctx, die);
3397 DWARFASTParserClang::GetOwningClangModule(const DWARFDIE &die) {
3398 if (!die.IsValid())
3401 for (DWARFDIE parent = die.GetParent(); parent.IsValid();
3423 static bool IsSubroutine(const DWARFDIE &die) {
3424 switch (die.Tag()) {
3433 static DWARFDIE GetContainingFunctionWithAbstractOrigin(const DWARFDIE &die) {
3434 for (DWARFDIE candidate = die; candidate; candidate = candidate.GetParent()) {
3471 DWARFASTParserClang::GetDeclContextForBlock(const DWARFDIE &die) {
3472 assert(die.Tag() == DW_TAG_lexical_block);
3474 GetContainingFunctionWithAbstractOrigin(die);
3476 return (clang::DeclContext *)ResolveBlockDIE(die);
3479 die, containing_function_with_abstract_origin);
3485 clang::BlockDecl *DWARFASTParserClang::ResolveBlockDIE(const DWARFDIE &die) {
3486 if (die && die.Tag() == DW_TAG_lexical_block) {
3488 llvm::cast_or_null<clang::BlockDecl>(m_die_to_decl_ctx[die.GetDIE()]);
3493 GetClangDeclContextContainingDIE(die, &decl_context_die);
3495 m_ast.CreateBlockDeclaration(decl_context, GetOwningClangModule(die));
3498 LinkDeclContextToDIE((clang::DeclContext *)decl, die);
3507 DWARFASTParserClang::ResolveNamespaceDIE(const DWARFDIE &die) {
3508 if (die && die.Tag() == DW_TAG_namespace) {
3509 // See if we already parsed this namespace DIE and associated it with a
3512 static_cast<clang::NamespaceDecl *>(m_die_to_decl_ctx[die.GetDIE()]);
3516 const char *namespace_name = die.GetName();
3518 GetClangDeclContextContainingDIE(die, nullptr);
3520 die.GetAttributeValueAsUnsigned(DW_AT_export_symbols, 0) != 0;
3523 namespace_name, containing_decl_ctx, GetOwningClangModule(die),
3527 LinkDeclContextToDIE((clang::DeclContext *)namespace_decl, die);
3535 DWARFASTParserClang::ResolveImportedDeclarationDIE(const DWARFDIE &die) {
3536 assert(die && die.Tag() == DW_TAG_imported_declaration);
3540 auto it = m_die_to_decl_ctx.find(die.GetDIE());
3547 die.GetAttributeValueAsReferenceDIE(DW_AT_import);
3565 LinkDeclContextToDIE(namespace_decl, die);
3571 const DWARFDIE &die, DWARFDIE *decl_ctx_die_copy) {
3572 SymbolFileDWARF *dwarf = die.GetDWARF();
3574 DWARFDIE decl_ctx_die = dwarf->GetDeclContextDIEContainingDIE(die);
3589 DWARFASTParserClang::GetCachedClangDeclContextForDIE(const DWARFDIE &die) {
3590 if (die) {
3591 DIEToDeclContextMap::iterator pos = m_die_to_decl_ctx.find(die.GetDIE());
3599 const DWARFDIE &die) {
3600 m_die_to_decl_ctx[die.GetDIE()] = decl_ctx;
3602 // m_decl_ctx_to_die[decl_ctx].insert(die.GetDIE());
3603 m_decl_ctx_to_die.insert(std::make_pair(decl_ctx, die));
3619 auto gather = [](DWARFDIE die, UniqueCStringMap<DWARFDIE> &map,
3621 if (die.Tag() != DW_TAG_subprogram)
3627 if (die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0) != 1)
3630 if (const char *name = die.GetMangledName()) {
3632 if (die.GetAttributeValueAsUnsigned(DW_AT_artificial, 0))
3633 map_artificial.Append(const_name, die);
3635 map.Append(const_name, die);
3791 DWARFDIE &die, const DWARFDIE &parent_die, CompilerType &class_clang_type,
3794 assert(die.Tag() == llvm::dwarf::DW_TAG_variant_part);
3795 assert(SymbolFileDWARF::GetLanguage(*die.GetCU()) ==
3800 VariantPart variants(die, parent_die, module_sp);
3803 die.ResolveTypeUID(variants.discriminant().type_ref.Reference());
3819 auto member_type = die.ResolveTypeUID(member.type_ref.Reference());