diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-20 17:47:34 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-20 17:47:34 +0000 |
commit | 4d7353923f7bfbcf9a9d8c32852525fcfb351604 (patch) | |
tree | 460eae0ba294ac76b2ed5c9affaacc31d7cf1cff /gcc/tree-pretty-print.c | |
parent | 9f30f9e75ef295b99fea5ef544b5a9b9674311f2 (diff) | |
download | gcc-4d7353923f7bfbcf9a9d8c32852525fcfb351604.tar.gz |
2006-02-20 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/25879
* tree-pretty-print.c (debug_tree_chain): Walk the chains.
(dump_decl_name): Do not walk the decl tree chains.
* tree-pass.h (TDF_CHAIN): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111308 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index fdf3f132a30..03f9753bbf7 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -101,7 +101,12 @@ debug_generic_stmt (tree t) void debug_tree_chain (tree t) { - print_generic_expr (stderr, t, TDF_VOPS|TDF_UID|TDF_CHAIN); + while (t) + { + print_generic_expr (stderr, t, TDF_VOPS|TDF_UID); + fprintf(stderr, " "); + t = TREE_CHAIN (t); + } fprintf (stderr, "\n"); } @@ -160,32 +165,20 @@ dump_decl_name (pretty_printer *buffer, tree node, int flags) { tree t = node; - while (t) + if (DECL_NAME (t)) + pp_tree_identifier (buffer, DECL_NAME (t)); + if ((flags & TDF_UID) + || DECL_NAME (t) == NULL_TREE) { - if (DECL_NAME (t)) - pp_tree_identifier (buffer, DECL_NAME (t)); - - if ((flags & TDF_UID) - || DECL_NAME (t) == NULL_TREE) - { - if (TREE_CODE (t) == LABEL_DECL - && LABEL_DECL_UID (t) != -1) - pp_printf (buffer, "L." HOST_WIDE_INT_PRINT_DEC, - LABEL_DECL_UID (t)); - else - { - char c = TREE_CODE (t) == CONST_DECL ? 'C' : 'D'; - pp_printf (buffer, "%c.%u", c, DECL_UID (t)); - } - } - - if (flags & TDF_CHAIN) + if (TREE_CODE (t) == LABEL_DECL + && LABEL_DECL_UID (t) != -1) + pp_printf (buffer, "L." HOST_WIDE_INT_PRINT_DEC, + LABEL_DECL_UID (t)); + else { - t = TREE_CHAIN (t); - pp_string (buffer, " "); + char c = TREE_CODE (t) == CONST_DECL ? 'C' : 'D'; + pp_printf (buffer, "%c.%u", c, DECL_UID (t)); } - else - t = NULL_TREE; } } |