OSDN Git Service

* Makefile.in (local-distclean): Remove leftover built files.
[pf3gnuchains/gcc-fork.git] / gcc / c-dump.h
1 /* Tree-dumping functionality for intermediate representation.
2    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
3    Written by Mark Mitchell <mark@codesourcery.com>
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 /* Flags used with queue functions.  */
23 #define DUMP_NONE     0
24 #define DUMP_BINFO    1
25
26 /* Information about a node to be dumped.  */
27
28 typedef struct dump_node_info
29 {
30   /* The index for the node.  */
31   unsigned int index;
32   /* Nonzero if the node is a binfo.  */
33   unsigned int binfo_p : 1;
34 } *dump_node_info_p;
35
36 /* A dump_queue is a link in the queue of things to be dumped.  */
37
38 typedef struct dump_queue
39 {
40   /* The queued tree node.  */
41   splay_tree_node node;
42   /* The next node in the queue.  */
43   struct dump_queue *next;
44 } *dump_queue_p;
45
46 /* A dump_info gives information about how we should perform the dump 
47    and about the current state of the dump.  */
48
49 struct dump_info
50 {
51   /* The stream on which to dump the information.  */
52   FILE *stream;
53   /* The next unused node index.  */
54   unsigned int index;
55   /* The next column.  */
56   unsigned int column;
57   /* The first node in the queue of nodes to be written out.  */
58   dump_queue_p queue;
59   /* The last node in the queue.  */
60   dump_queue_p queue_end;
61   /* Free queue nodes.  */
62   dump_queue_p free_list;
63   /* The tree nodes which we have already written out.  The 
64      keys are the addresses of the nodes; the values are the integer
65      indices we assigned them.  */
66   splay_tree nodes;
67 };
68
69 /* Dump the CHILD and its children.  */
70 #define dump_child(field, child) \
71   queue_and_dump_index (di, field, child, DUMP_NONE)
72
73 extern void dump_int 
74   PARAMS ((dump_info_p, const char *, int));
75 extern void dump_string 
76   PARAMS ((dump_info_p, const char *));
77 extern void dump_stmt 
78   PARAMS ((dump_info_p, tree));
79 extern void dump_next_stmt 
80   PARAMS ((dump_info_p, tree));
81 extern void queue_and_dump_index 
82   PARAMS ((dump_info_p, const char *, tree, int));
83 extern void queue_and_dump_type 
84   PARAMS ((dump_info_p, tree));