summaryrefslogtreecommitdiff
path: root/gcc/print-tree.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/print-tree.c
parent636e3cb6f9e28933f19599a16b663881f9e7669e (diff)
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/print-tree.c')
-rw-r--r--gcc/print-tree.c35
1 files changed, 29 insertions, 6 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index a44d23a8474..eebd1c35ba1 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-iterator.h"
#include "diagnostic.h"
#include "tree-flow.h"
+#include "tree-pass.h"
/* Define the hash table of nodes already seen.
Such nodes are not repeated; brief cross-references are used. */
@@ -95,10 +96,22 @@ print_node_brief (FILE *file, const char *prefix, const_tree node, int indent)
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
else if (TREE_CODE (node) == LABEL_DECL
&& LABEL_DECL_UID (node) != -1)
- fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+ {
+ if (dump_flags & TDF_NOUID)
+ fprintf (file, " L.xxxx");
+ else
+ fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+ }
else
- fprintf (file, " %c.%u", TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
- DECL_UID (node));
+ {
+ if (dump_flags & TDF_NOUID)
+ fprintf (file, " %c.xxxx",
+ TREE_CODE (node) == CONST_DECL ? 'C' : 'D');
+ else
+ fprintf (file, " %c.%u",
+ TREE_CODE (node) == CONST_DECL ? 'C' : 'D',
+ DECL_UID (node));
+ }
}
else if (tclass == tcc_type)
{
@@ -260,10 +273,20 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
fprintf (file, " %s", IDENTIFIER_POINTER (DECL_NAME (node)));
else if (code == LABEL_DECL
&& LABEL_DECL_UID (node) != -1)
- fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+ {
+ if (dump_flags & TDF_NOUID)
+ fprintf (file, " L.xxxx");
+ else
+ fprintf (file, " L.%d", (int) LABEL_DECL_UID (node));
+ }
else
- fprintf (file, " %c.%u", code == CONST_DECL ? 'C' : 'D',
- DECL_UID (node));
+ {
+ if (dump_flags & TDF_NOUID)
+ fprintf (file, " %c.xxxx", code == CONST_DECL ? 'C' : 'D');
+ else
+ fprintf (file, " %c.%u", code == CONST_DECL ? 'C' : 'D',
+ DECL_UID (node));
+ }
}
else if (tclass == tcc_type)
{