<rdar://problem/13287629>
Fixed an issue with clang 500's new way to represent static class variables where it emits a DW_TAG_member with a DW_AT_external(0x01) attribute and no DW_AT_data_member_location. llvm-svn: 176140
This commit is contained in:
		
							parent
							
								
									e40467b589
								
							
						
					
					
						commit
						e528efd734
					
				| 
						 | 
				
			
			@ -1634,7 +1634,7 @@ SymbolFileDWARF::ParseChildMembers
 | 
			
		|||
                    const char *prop_name = NULL;
 | 
			
		||||
                    const char *prop_getter_name = NULL;
 | 
			
		||||
                    const char *prop_setter_name = NULL;
 | 
			
		||||
                    uint32_t        prop_attributes = 0;
 | 
			
		||||
                    uint32_t prop_attributes = 0;
 | 
			
		||||
                    
 | 
			
		||||
                    
 | 
			
		||||
                    bool is_artificial = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -1644,6 +1644,7 @@ SymbolFileDWARF::ParseChildMembers
 | 
			
		|||
                    size_t byte_size = 0;
 | 
			
		||||
                    size_t bit_offset = 0;
 | 
			
		||||
                    size_t bit_size = 0;
 | 
			
		||||
                    bool is_external = false; // On DW_TAG_members, this means the member is static
 | 
			
		||||
                    uint32_t i;
 | 
			
		||||
                    for (i=0; i<num_attributes && !is_artificial; ++i)
 | 
			
		||||
                    {
 | 
			
		||||
| 
						 | 
				
			
			@ -1688,11 +1689,12 @@ SymbolFileDWARF::ParseChildMembers
 | 
			
		|||
                                break;
 | 
			
		||||
 | 
			
		||||
                            case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType (form_value.Unsigned()); break;
 | 
			
		||||
                            case DW_AT_artificial: is_artificial = form_value.Unsigned() != 0; break;                            
 | 
			
		||||
                            case DW_AT_artificial: is_artificial = form_value.Unsigned() != 0; break;
 | 
			
		||||
                            case DW_AT_APPLE_property_name:      prop_name = form_value.AsCString(&get_debug_str_data()); break;
 | 
			
		||||
                            case DW_AT_APPLE_property_getter:    prop_getter_name = form_value.AsCString(&get_debug_str_data()); break;
 | 
			
		||||
                            case DW_AT_APPLE_property_setter:    prop_setter_name = form_value.AsCString(&get_debug_str_data()); break;
 | 
			
		||||
                            case DW_AT_APPLE_property_attribute: prop_attributes = form_value.Unsigned(); break;
 | 
			
		||||
                            case DW_AT_external:                 is_external = form_value.Unsigned() != 0; break;
 | 
			
		||||
 | 
			
		||||
                            default:
 | 
			
		||||
                            case DW_AT_declaration:
 | 
			
		||||
| 
						 | 
				
			
			@ -1781,6 +1783,10 @@ SymbolFileDWARF::ParseChildMembers
 | 
			
		|||
                        is_artificial = true;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    // Skip static members
 | 
			
		||||
                    if (is_external && member_byte_offset == UINT32_MAX)
 | 
			
		||||
                        break;
 | 
			
		||||
 | 
			
		||||
                    if (is_artificial == false)
 | 
			
		||||
                    {
 | 
			
		||||
                        Type *member_type = ResolveTypeUID(encoding_uid);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue