Reset link field to NULL on construction
[libfirm] / ir / ir / irprog_t.h
1
2 /* $Id$ */
3
4 /**
5  * @file irprog_t.h
6  */
7
8 # ifndef _IRPROG_T_H_
9 # define _IRPROG_T_H_
10
11 #ifdef HAVE_CONFIG_H
12 #include "config.h"
13 #endif
14
15 #include "irprog.h"
16 #include "firm_common_t.h"
17
18
19 /** ir_prog */
20 struct ir_prog {
21   firm_kind kind;
22   ir_graph  *main_irg;            /**< entry point to the compiled program
23                      or a list, in case we compile a library or the like? */
24   ir_graph **graphs;              /**< all graphs in the ir */
25   type      *glob_type;           /**< global type.  Must be a class as it can
26                                      have fields and procedures.  */
27   type     **types;               /**< all types in the ir */
28   ir_graph  *const_code_irg;      /**< This ir graph gives the proper environment
29                                      to allocate nodes the represent values
30                                      of constant entities. It is not meant as
31                                      a procedure.  */
32   /*struct obstack *obst;          * @@@ Should we place all types and
33                                      entities on an obstack, too? */
34
35 #ifdef DEBUG_libfirm
36   long max_node_nr;                /**< to generate unique numbers for nodes. */
37 #endif
38 };
39
40 INLINE void remove_irp_type_from_list (type *typ);
41
42 #ifdef DEBUG_libfirm
43 /** Returns a new, unique number to number nodes or the like. */
44 int get_irp_new_node_nr(void);
45 #endif
46
47 #endif /* ifndef _IRPROG_T_H_ */