diff options
Diffstat (limited to 'gcc/ada/misc.c')
-rw-r--r-- | gcc/ada/misc.c | 66 |
1 files changed, 6 insertions, 60 deletions
diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index dca2b0fe9f2..f8fe4de4c19 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -121,6 +121,12 @@ static void gnat_adjust_rli (record_layout_info); #define LANG_HOOKS_HONOR_READONLY true #undef LANG_HOOKS_HASH_TYPES #define LANG_HOOKS_HASH_TYPES false +#undef LANG_HOOKS_PUSHLEVEL +#define LANG_HOOKS_PUSHLEVEL lhd_do_nothing_i +#undef LANG_HOOKS_POPLEVEL +#define LANG_HOOKS_POPLEVEL lhd_do_nothing_iii_return_null_tree +#undef LANG_HOOKS_SET_BLOCK +#define LANG_HOOKS_SET_BLOCK lhd_do_nothing_t #undef LANG_HOOKS_FINISH_INCOMPLETE_DECL #define LANG_HOOKS_FINISH_INCOMPLETE_DECL gnat_finish_incomplete_decl #undef LANG_HOOKS_GET_ALIAS_SET @@ -698,66 +704,6 @@ gnat_eh_type_covers (tree a, tree b) return (a == b || a == integer_zero_node); } -/* See if DECL has an RTL that is indirect via a pseudo-register or a - memory location and replace it with an indirect reference if so. - This improves the debugger's ability to display the value. */ - -void -adjust_decl_rtl (tree decl) -{ - tree new_type; - - /* If this decl is already indirect, don't do anything. This should - mean that the decl cannot be indirect, but there's no point in - adding an abort to check that. */ - if (TREE_CODE (decl) != CONST_DECL - && ! DECL_BY_REF_P (decl) - && (GET_CODE (DECL_RTL (decl)) == MEM - && (GET_CODE (XEXP (DECL_RTL (decl), 0)) == MEM - || (GET_CODE (XEXP (DECL_RTL (decl), 0)) == REG - && (REGNO (XEXP (DECL_RTL (decl), 0)) - > LAST_VIRTUAL_REGISTER)))) - /* We can't do this if the reference type's mode is not the same - as the current mode, which means this may not work on mixed 32/64 - bit systems. */ - && (new_type = build_reference_type (TREE_TYPE (decl))) != 0 - && TYPE_MODE (new_type) == GET_MODE (XEXP (DECL_RTL (decl), 0)) - /* If this is a PARM_DECL, we can only do it if DECL_INCOMING_RTL - is also an indirect and of the same mode and if the object is - readonly, the latter condition because we don't want to upset the - handling of CICO_LIST. */ - && (TREE_CODE (decl) != PARM_DECL - || (GET_CODE (DECL_INCOMING_RTL (decl)) == MEM - && (TYPE_MODE (new_type) - == GET_MODE (XEXP (DECL_INCOMING_RTL (decl), 0))) - && TREE_READONLY (decl)))) - { - new_type - = build_qualified_type (new_type, - (TYPE_QUALS (new_type) | TYPE_QUAL_CONST)); - - DECL_POINTS_TO_READONLY_P (decl) = TREE_READONLY (decl); - DECL_BY_REF_P (decl) = 1; - SET_DECL_RTL (decl, XEXP (DECL_RTL (decl), 0)); - TREE_TYPE (decl) = new_type; - DECL_MODE (decl) = TYPE_MODE (new_type); - DECL_ALIGN (decl) = TYPE_ALIGN (new_type); - DECL_SIZE (decl) = TYPE_SIZE (new_type); - - if (TREE_CODE (decl) == PARM_DECL) - set_decl_incoming_rtl (decl, XEXP (DECL_INCOMING_RTL (decl), 0)); - - /* If DECL_INITIAL was set, it should be updated to show that - the decl is initialized to the address of that thing. - Otherwise, just set it to the address of this decl. - It needs to be set so that GCC does not think the decl is - unused. */ - DECL_INITIAL (decl) - = build1 (ADDR_EXPR, new_type, - DECL_INITIAL (decl) != 0 ? DECL_INITIAL (decl) : decl); - } -} - /* Record the current code position in GNAT_NODE. */ void |