]> git.ipfire.org Git - thirdparty/gcc.git/commit
dwarf2out.c: Pass one cv_quals argument instead of two for const and volatile.
authorMark Wielaard <mjw@redhat.com>
Tue, 19 Aug 2014 11:00:37 +0000 (11:00 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Tue, 19 Aug 2014 11:00:37 +0000 (11:00 +0000)
commita98c0e91c7ec2cbb72ec7fc2fa12443c0b33be3a
tree25a00394306de8c068bed101a93878ae6e3826db
parenta6dad7b65850d7b4ea83f7a8e17d74e7aeefcdd5
dwarf2out.c: Pass one cv_quals argument instead of two for const and volatile.

modified_type_die and add_type_attribute take two separate arguments
for whether the type should be const and/or volatile. To help add
more type modifiers pass the requested modifiers as one cv_quals argument
to these functions. And introduce helper function decl_quals to extract
additional cv_quals from declaration trees.

DWARFv3 added restrict_type [PR debug/59051] and DWARFv5 has proposals
for atomic_type and aligned_type. Which will be easier to implement based
on this change.

gcc/ChangeLog

* dwarf2out.c (decl_quals): New function.
(modified_type_die): Take one cv_quals argument instead of two,
one for const and one for volatile.
(add_type_attribute): Likewise.
(generic_parameter_die): Call add_type_attribute with one modifier
argument.
(base_type_for_mode): Likewise.
(add_bounds_info): Likewise.
(add_subscript_info): Likewise.
(gen_array_type_die): Likewise.
(gen_descr_array_type_die): Likewise.
(gen_entry_point_die): Likewise.
(gen_enumeration_type_die): Likewise.
(gen_formal_parameter_die): Likewise.
(gen_subprogram_die): Likewise.
(gen_variable_die): Likewise.
(gen_const_die): Likewise.
(gen_field_die): Likewise.
(gen_pointer_type_die): Likewise.
(gen_reference_type_die): Likewise.
(gen_ptr_to_mbr_type_die): Likewise.
(gen_inheritance_die): Likewise.
(gen_subroutine_type_die): Likewise.
(gen_typedef_die): Likewise.
(force_type_die): Likewise.

From-SVN: r214140
gcc/ChangeLog
gcc/dwarf2out.c