From f736b911e6fb32807028ef1624fd73dfca33d699 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 9 Nov 2015 01:19:19 -0800 Subject: Add hook for modifying debug info for address spaces * dwarf2out.c (modified_type_die): Pass the address space number through TARGET_ADDR_SPACE_DEBUG to produce the dwarf address class. * target.def (TARGET_ADDR_SPACE_DEBUG): New. * targhooks.c (default_addr_space_debug): New. * targhooks.h (default_addr_space_debug): Declare. * doc/tm.texi.in (TARGET_ADDR_SPACE_DEBUG): Mark it. * doc/tm.texi: Rebuild. From-SVN: r230000 --- gcc/targhooks.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/targhooks.c') diff --git a/gcc/targhooks.c b/gcc/targhooks.c index d9108a6..c810525 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -1277,6 +1277,14 @@ default_addr_space_zero_address_valid (addr_space_t as ATTRIBUTE_UNUSED) return false; } +/* The default hook for debugging the address space is to return the + address space number to indicate DW_AT_address_class. */ +int +default_addr_space_debug (addr_space_t as) +{ + return as; +} + /* The default hook for TARGET_ADDR_SPACE_CONVERT. This hook should never be called for targets with only a generic address space. */ -- cgit v1.1