@@ -472,8 +472,7 @@ SymbolFileDWARF::SymbolFileDWARF(ObjectFileSP objfile_sp,
472472 : SymbolFileCommon(std::move(objfile_sp)), m_debug_map_module_wp(),
473473 m_debug_map_symfile(nullptr ),
474474 m_context(m_objfile_sp->GetModule ()->GetSectionList(), dwo_section_list),
475- m_fetched_external_modules(false ),
476- m_supports_DW_AT_APPLE_objc_complete_type(eLazyBoolCalculate) {}
475+ m_fetched_external_modules(false ) {}
477476
478477SymbolFileDWARF::~SymbolFileDWARF () = default ;
479478
@@ -3072,37 +3071,6 @@ Symbol *SymbolFileDWARF::GetObjCClassSymbol(ConstString objc_class_name) {
30723071 return objc_class_symbol;
30733072}
30743073
3075- // Some compilers don't emit the DW_AT_APPLE_objc_complete_type attribute. If
3076- // they don't then we can end up looking through all class types for a complete
3077- // type and never find the full definition. We need to know if this attribute
3078- // is supported, so we determine this here and cache th result. We also need to
3079- // worry about the debug map
3080- // DWARF file
3081- // if we are doing darwin DWARF in .o file debugging.
3082- bool SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type (DWARFUnit *cu) {
3083- if (m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolCalculate) {
3084- m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolNo;
3085- if (cu && cu->Supports_DW_AT_APPLE_objc_complete_type ())
3086- m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolYes;
3087- else {
3088- DWARFDebugInfo &debug_info = DebugInfo ();
3089- const uint32_t num_compile_units = GetNumCompileUnits ();
3090- for (uint32_t cu_idx = 0 ; cu_idx < num_compile_units; ++cu_idx) {
3091- DWARFUnit *dwarf_cu = debug_info.GetUnitAtIndex (cu_idx);
3092- if (dwarf_cu != cu &&
3093- dwarf_cu->Supports_DW_AT_APPLE_objc_complete_type ()) {
3094- m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolYes;
3095- break ;
3096- }
3097- }
3098- }
3099- if (m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolNo &&
3100- GetDebugMapSymfile ())
3101- return m_debug_map_symfile->Supports_DW_AT_APPLE_objc_complete_type (this );
3102- }
3103- return m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolYes;
3104- }
3105-
31063074// This function can be used when a DIE is found that is a forward declaration
31073075// DIE and we want to try and find a type that has the complete definition.
31083076TypeSP SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE (
@@ -3120,8 +3088,7 @@ TypeSP SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE(
31203088 if (type_die == die || !IsStructOrClassTag (type_die.Tag ()))
31213089 return true ;
31223090
3123- if (must_be_implementation &&
3124- type_die.Supports_DW_AT_APPLE_objc_complete_type ()) {
3091+ if (must_be_implementation) {
31253092 const bool try_resolving_type = type_die.GetAttributeValueAsUnsigned (
31263093 DW_AT_APPLE_objc_complete_type, 0 );
31273094 if (!try_resolving_type)
0 commit comments