summaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-11-30 10:36:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-11-30 10:36:54 +0000
commit831b9ef8f0c8f6a068aa34bcccac81f7405f8d1e (patch)
treecd696f36bde52123ee764215456860ca41bdccff /gcc/tree-pretty-print.c
parent636e3cb6f9e28933f19599a16b663881f9e7669e (diff)
downloadgcc-831b9ef8f0c8f6a068aa34bcccac81f7405f8d1e.tar.gz
tree-dump.c (dump_option_value_in): Add TDF_NOUID.
2009-11-30 Richard Guenther <rguenther@suse.de> * tree-dump.c (dump_option_value_in): Add TDF_NOUID. * tree-pass.h (TDF_NOUID): Likewise. * print-rtl.c: Include tree-pass.h. (print_mem_expr): Pass dump_flags. (print_rtx): Likewise. * print-tree.c: Include tree-pass.h. (print_node_brief): Handle TDF_NOUID. (print_node): Likewise. * tree-pretty-print.c (dump_decl_name): Likewise. (dump_generic_node): Likewise. * Makefile.in (print-rtl.o, print-tree.o): Add $(TREE_PASS_H) dependency. From-SVN: r154775
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index caa19ac8d6c..44d4a5d9c03 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -182,13 +182,21 @@ dump_decl_name (pretty_printer *buffer, tree node, int flags)
if ((flags & TDF_UID) || DECL_NAME (node) == NULL_TREE)
{
if (TREE_CODE (node) == LABEL_DECL && LABEL_DECL_UID (node) != -1)
- pp_printf (buffer, "L.%d", (int) LABEL_DECL_UID (node));
+ pp_printf (buffer, "L.%d", (int) LABEL_DECL_UID (node));
else if (TREE_CODE (node) == DEBUG_EXPR_DECL)
- pp_printf (buffer, "D#%i", DEBUG_TEMP_UID (node));
+ {
+ if (flags & TDF_NOUID)
+ pp_string (buffer, "D#xxxx");
+ else
+ pp_printf (buffer, "D#%i", DEBUG_TEMP_UID (node));
+ }
else
{
char c = TREE_CODE (node) == CONST_DECL ? 'C' : 'D';
- pp_printf (buffer, "%c.%u", c, DECL_UID (node));
+ if (flags & TDF_NOUID)
+ pp_printf (buffer, "%c.xxxx", c);
+ else
+ pp_printf (buffer, "%c.%u", c, DECL_UID (node));
}
}
}
@@ -1030,9 +1038,14 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
if (DECL_NAME (node))
dump_decl_name (buffer, node, flags);
else if (LABEL_DECL_UID (node) != -1)
- pp_printf (buffer, "<L%d>", (int) LABEL_DECL_UID (node));
+ pp_printf (buffer, "<L%d>", (int) LABEL_DECL_UID (node));
else
- pp_printf (buffer, "<D.%u>", DECL_UID (node));
+ {
+ if (flags & TDF_NOUID)
+ pp_string (buffer, "<D.xxxx>");
+ else
+ pp_printf (buffer, "<D.%u>", DECL_UID (node));
+ }
break;
case TYPE_DECL: