aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc/tree-dump.h
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-02-01 18:16:02 +0000
commit1952e2e1c1be6f107fa3ce8b10025cfd1cd7943b (patch)
tree086d9d6c8fbd4fc8fe4495059332f66bc0f8d12b /contrib/gcc/tree-dump.h
parentd337ceafd72ec93f99dfbee5ea0e70ed180a2dd6 (diff)
downloadsrc-1952e2e1c1be6f107fa3ce8b10025cfd1cd7943b.tar.gz
src-1952e2e1c1be6f107fa3ce8b10025cfd1cd7943b.zip
Enlist the FreeBSD-CURRENT users as testers of what is to become Gcc 3.1.0.
These bits are taken from the FSF anoncvs repo on 1-Feb-2002 08:20 PST.
Notes
Notes: svn path=/vendor/gcc/dist/; revision=90075
Diffstat (limited to 'contrib/gcc/tree-dump.h')
-rw-r--r--contrib/gcc/tree-dump.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/contrib/gcc/tree-dump.h b/contrib/gcc/tree-dump.h
new file mode 100644
index 000000000000..9e9888e0ad5b
--- /dev/null
+++ b/contrib/gcc/tree-dump.h
@@ -0,0 +1,95 @@
+/* Tree-dumping functionality for intermediate representation.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Written by Mark Mitchell <mark@codesourcery.com>
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA. */
+
+#ifndef GCC_TREE_DUMP_H
+#define GCC_TREE_DUMP_H
+
+/* Flags used with queue functions. */
+#define DUMP_NONE 0
+#define DUMP_BINFO 1
+
+/* Information about a node to be dumped. */
+
+typedef struct dump_node_info
+{
+ /* The index for the node. */
+ unsigned int index;
+ /* Nonzero if the node is a binfo. */
+ unsigned int binfo_p : 1;
+} *dump_node_info_p;
+
+/* A dump_queue is a link in the queue of things to be dumped. */
+
+typedef struct dump_queue
+{
+ /* The queued tree node. */
+ splay_tree_node node;
+ /* The next node in the queue. */
+ struct dump_queue *next;
+} *dump_queue_p;
+
+/* A dump_info gives information about how we should perform the dump
+ and about the current state of the dump. */
+
+struct dump_info
+{
+ /* The stream on which to dump the information. */
+ FILE *stream;
+ /* The original node. */
+ tree node;
+ /* User flags. */
+ int flags;
+ /* The next unused node index. */
+ unsigned int index;
+ /* The next column. */
+ unsigned int column;
+ /* The first node in the queue of nodes to be written out. */
+ dump_queue_p queue;
+ /* The last node in the queue. */
+ dump_queue_p queue_end;
+ /* Free queue nodes. */
+ dump_queue_p free_list;
+ /* The tree nodes which we have already written out. The
+ keys are the addresses of the nodes; the values are the integer
+ indices we assigned them. */
+ splay_tree nodes;
+};
+
+/* Dump the CHILD and its children. */
+#define dump_child(field, child) \
+ queue_and_dump_index (di, field, child, DUMP_NONE)
+
+extern void dump_pointer
+ PARAMS ((dump_info_p, const char *, void *));
+extern void dump_int
+ PARAMS ((dump_info_p, const char *, int));
+extern void dump_string
+ PARAMS ((dump_info_p, const char *));
+extern void dump_stmt
+ PARAMS ((dump_info_p, tree));
+extern void dump_next_stmt
+ PARAMS ((dump_info_p, tree));
+extern void queue_and_dump_index
+ PARAMS ((dump_info_p, const char *, tree, int));
+extern void queue_and_dump_type
+ PARAMS ((dump_info_p, tree));
+
+#endif /* ! GCC_TREE_DUMP_H */