]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
middle-end: Pretty-print address space of aggregates
authorJulian Brown <julian@codesourcery.com>
Sat, 6 Mar 2021 19:07:26 +0000 (19:07 +0000)
committerJulian Brown <julian@codesourcery.com>
Sat, 6 Mar 2021 19:09:39 +0000 (19:09 +0000)
This patch adds printing of "<address-space-N>" markers for aggregates
in non-default address spaces.

gcc/
* tree-pretty-print.c (dump_generic_node): Emit non-generic
address space info for aggregates.

gcc/tree-pretty-print.c

index 62899dfa158ece0625647dcc07b4bfceb04d4ceb..0a575eb9dad7111eb0d8c6723082deb6fac705bf 100644 (file)
@@ -1968,6 +1968,13 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
        if (quals & TYPE_QUAL_VOLATILE)
          pp_string (pp, "volatile ");
 
+       if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (node)))
+         {
+           pp_string (pp, "<address-space-");
+           pp_decimal_int (pp, TYPE_ADDR_SPACE (node));
+           pp_string (pp, "> ");
+         }
+
         /* Print the name of the structure.  */
         if (TREE_CODE (node) == RECORD_TYPE)
          pp_string (pp, "struct ");