diff options
author | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-31 00:09:10 +0000 |
---|---|---|
committer | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-31 00:09:10 +0000 |
commit | c54d9523a6d798fd9c28db0f6fd1f850947abf75 (patch) | |
tree | 4c9bcf08b5db153f69f7bbd244e9f860d0301d5f /gcc/print-tree.c | |
parent | cc5ffbb89adf4e31c9769ef034147eca60864746 (diff) | |
download | gcc-c54d9523a6d798fd9c28db0f6fd1f850947abf75.tar.gz |
2005-03-30 Stuart Hastings <stuart@apple.com>
Dale Johannesen <dalej@apple.com>
* Makefile.in (print-tree.o): Depend on tree-iterator.h.
* print-tree.c (print_node): Add case STATEMENT_LIST.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97292 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r-- | gcc/print-tree.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 55bb6ed5b69..873d11b7b81 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -28,6 +28,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "real.h" #include "ggc.h" #include "langhooks.h" +#include "tree-iterator.h" /* Define the hash table of nodes already seen. Such nodes are not repeated; brief cross-references are used. */ @@ -723,6 +724,28 @@ print_node (FILE *file, const char *prefix, tree node, int indent) } break; + case STATEMENT_LIST: + fprintf (file, " head " HOST_PTR_PRINTF " tail " HOST_PTR_PRINTF " stmts", + (void *) node->stmt_list.head, (void *) node->stmt_list.tail); + { + tree_stmt_iterator i; + for (i = tsi_start (node); !tsi_end_p (i); tsi_next (&i)) + { + /* Not printing the addresses of the (not-a-tree) + 'struct tree_stmt_list_node's. */ + fprintf (file, " " HOST_PTR_PRINTF, (void *)tsi_stmt (i)); + } + fprintf (file, "\n"); + for (i = tsi_start (node); !tsi_end_p (i); tsi_next (&i)) + { + /* Not printing the addresses of the (not-a-tree) + 'struct tree_stmt_list_node's. */ + print_node (file, "stmt", tsi_stmt (i), indent + 4); + } + } + print_node (file, "chain", TREE_CHAIN (node), indent + 4); + break; + case BLOCK: print_node (file, "vars", BLOCK_VARS (node), indent + 4); print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), |