aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/tree-pass.h2
-rw-r--r--gcc/tree-pretty-print.c41
3 files changed, 26 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6be6b4e..d469ded 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,12 @@
-2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
+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.
+
+2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
+
* Makefile.in (C): Remove
(PROTO): Remove
(.PHONY): Remove C and PROTO
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 658b624..a538d5b 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -68,8 +68,6 @@ enum tree_dump_index
#define TDF_STMTADDR (1 << 12) /* Address of stmt. */
#define TDF_GRAPH (1 << 13) /* a graph dump is being emitted */
-#define TDF_CHAIN (1 << 14) /* Follow TREE_CHAIN when
- dumping *_DECLs. */
extern char *get_dump_file_name (enum tree_dump_index);
extern int dump_enabled_p (enum tree_dump_index);
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index fdf3f13..03f9753 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;
}
}