diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-02-16 18:01:04 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-02-16 18:01:04 +0000 |
commit | 7005800cd120168075924fe4aa254b6f80c500c7 (patch) | |
tree | 93b6a383eac0e03e24cd25a24772e2cd7d38691d /gcc/ada/gcc-interface/gigi.h | |
parent | 8c7eac6260ac801715a45c8c8ffad2dd96d77bac (diff) | |
download | gcc-7005800cd120168075924fe4aa254b6f80c500c7.zip gcc-7005800cd120168075924fe4aa254b6f80c500c7.tar.gz gcc-7005800cd120168075924fe4aa254b6f80c500c7.tar.bz2 |
gigi.h (maybe_debug_type): New inline function.
* gcc-interface/gigi.h (maybe_debug_type): New inline function.
* gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
Call maybe_character_value on the array bounds. Get to the base type
of the index type and call maybe_debug_type on it.
* gcc-interface/utils.c (finish_character_type): Add special treatment
From-SVN: r233469
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r-- | gcc/ada/gcc-interface/gigi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index a55b1b0..00b7c6a 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -1164,3 +1164,14 @@ maybe_character_value (tree expr) return expr; } + +/* Return the debug type of TYPE if it exists, otherwise TYPE itself. */ + +static inline tree +maybe_debug_type (tree type) +{ + if (TYPE_CAN_HAVE_DEBUG_TYPE_P (type) && TYPE_DEBUG_TYPE (type)) + type = TYPE_DEBUG_TYPE (type); + + return type; +} |