DWARF: add a language hook for scalar biased types
Front-ends like GNAT for Ada sometimes use biased encodings for integral
types. This change creates a new language hook so that the bias
information can make it into the debugging information back-end and
introduces an experimental DWARF attribute to hold it.
gcc/ada/ChangeLog:
* gcc-interface/misc.c (gnat_get_type_bias): New.
(LANG_HOOKS_GET_TYPE_BIAS): Redefine macro to implement the
get_type_bias language hook.
gcc/ChangeLog:
* langhooks.h (struct lang_hooks_for_types): New get_bias_field.
* langhooks-def.h (LANG_HOOKS_GET_TYPE_BIAS): New.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Initialize the
get_bias_field.
* dwarf2out.c
(base_type_die): In non-strict DWARF mode, invoke the
get_type_bias language hook for INTEGER_TYPE nodes. If it
returns a bias, emit an attribute for it.
(subrange_type_die): Change signature to handle bias. If
non-strict DWARF mode, emit an attribute for it, if one passed.
(modified_type_die): For subrange types, invoke the
get_type_bias langage hook and pass the bias to
subrange_type_die.
From-SVN: r231767