diff options
author | Pierre-Marie de Rodat <derodat@adacore.com> | 2017-04-27 09:49:49 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-27 11:49:49 +0200 |
commit | ed8cbbaf7d254e592bd9e57931cf2d57b6f62e9c (patch) | |
tree | 2dde61f659db5e42eeb4101dc516f8eb0e8cb0f4 /gcc/ada/gcc-interface/utils.c | |
parent | 6cbfce7e87651d5e7272bad48dfc63e71c1bb27a (diff) | |
download | gcc-ed8cbbaf7d254e592bd9e57931cf2d57b6f62e9c.zip gcc-ed8cbbaf7d254e592bd9e57931cf2d57b6f62e9c.tar.gz gcc-ed8cbbaf7d254e592bd9e57931cf2d57b6f62e9c.tar.bz2 |
utils.c (gnat_type_for_size): Set TYPE_ARTIFICIAL on created types.
2017-04-27 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/utils.c (gnat_type_for_size): Set
TYPE_ARTIFICIAL on created types.
From-SVN: r247303
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 0a6d6af..4549a1b 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2016, Free Software Foundation, Inc. * + * Copyright (C) 1992-2017, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -359,7 +359,7 @@ tree make_dummy_type (Entity_Id gnat_type) { Entity_Id gnat_equiv = Gigi_Equivalent_Type (Underlying_Type (gnat_type)); - tree gnu_type; + tree gnu_type, debug_type; /* If there was no equivalent type (can only happen when just annotating types) or underlying type, go back to the original type. */ @@ -384,6 +384,17 @@ make_dummy_type (Entity_Id gnat_type) SET_DUMMY_NODE (gnat_equiv, gnu_type); + /* Create a debug type so that debug info consumers only see an unspecified + type. */ + if (Needs_Debug_Info (gnat_type)) + { + debug_type = make_node (LANG_TYPE); + SET_TYPE_DEBUG_TYPE (gnu_type, debug_type); + + TYPE_NAME (debug_type) = TYPE_NAME (gnu_type); + TYPE_ARTIFICIAL (debug_type) = TYPE_ARTIFICIAL (gnu_type); + } + return gnu_type; } @@ -3384,6 +3395,7 @@ gnat_type_for_size (unsigned precision, int unsignedp) t = make_unsigned_type (precision); else t = make_signed_type (precision); + TYPE_ARTIFICIAL (t) = 1; if (precision <= 2 * MAX_BITS_PER_WORD) signed_and_unsigned_types[precision][unsignedp] = t; |