+2011-03-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Revert:
+ 2011-03-08 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Fix DWARF-3+ DW_AT_accessibility default assumption.
+ * dwarf2read.c (dwarf2_add_field): Fix new_field->accessibility for
+ cu->header.version >= 3.
+
2011-03-09 Yao Qi <yao@codesourcery.com>
* common/Makefile.in: Remove.
}
fip->nfields++;
- if (cu->header.version < 3)
- {
- /* The default DWARF 2 accessibility for members is public, the default
- accessibility for inheritance is private. */
-
- if (die->tag != DW_TAG_inheritance)
- new_field->accessibility = DW_ACCESS_public;
- else
- new_field->accessibility = DW_ACCESS_private;
- }
+ /* Handle accessibility and virtuality of field.
+ The default accessibility for members is public, the default
+ accessibility for inheritance is private. */
+ if (die->tag != DW_TAG_inheritance)
+ new_field->accessibility = DW_ACCESS_public;
else
- {
- /* DWARF 3 specifies the default accessibility explicitly. */
-
- if (die->parent->tag == DW_TAG_class_type)
- new_field->accessibility = DW_ACCESS_private;
- else
- new_field->accessibility = DW_ACCESS_public;
- }
+ new_field->accessibility = DW_ACCESS_private;
new_field->virtuality = DW_VIRTUALITY_none;
attr = dwarf2_attr (die, DW_AT_accessibility, cu);