OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / coretypes.h
1 /* GCC core type declarations.
2    Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
3
4 This file is part of GCC.
5
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
9 version.
10
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3.  If not see
18 <http://www.gnu.org/licenses/>.  */
19
20 /* Provide forward declarations of core types which are referred to by
21    most of the compiler.  This allows header files to use these types
22    (e.g. in function prototypes) without concern for whether the full
23    definitions are visible.  Some other declarations that need to be
24    universally visible are here, too.
25
26    In the context of tconfig.h, most of these have special definitions
27    which prevent them from being used except in further type
28    declarations.  This is a kludge; the right thing is to avoid
29    including the "tm.h" header set in the context of tconfig.h, but
30    we're not there yet.  */
31
32 #ifndef GCC_CORETYPES_H
33 #define GCC_CORETYPES_H
34
35 #define GTY(x)  /* nothing - marker for gengtype */
36
37 #ifndef USED_FOR_TARGET
38
39 struct bitmap_head_def;
40 typedef struct bitmap_head_def *bitmap;
41 typedef const struct bitmap_head_def *const_bitmap;
42 struct rtx_def;
43 typedef struct rtx_def *rtx;
44 typedef const struct rtx_def *const_rtx;
45 struct rtvec_def;
46 typedef struct rtvec_def *rtvec;
47 typedef const struct rtvec_def *const_rtvec;
48 union tree_node;
49 typedef union tree_node *tree;
50 union gimple_statement_d;
51 typedef union gimple_statement_d *gimple;
52 typedef const union tree_node *const_tree;
53 typedef const union gimple_statement_d *const_gimple;
54 union section;
55 typedef union section section;
56 struct cl_target_option;
57 struct cl_optimization;
58 struct gimple_seq_d;
59 typedef struct gimple_seq_d *gimple_seq;
60 typedef const struct gimple_seq_d *const_gimple_seq;
61 struct gimple_seq_node_d;
62 typedef struct gimple_seq_node_d *gimple_seq_node;
63 typedef const struct gimple_seq_node_d *const_gimple_seq_node;
64
65 /* The major intermediate representations of GCC.  */
66 enum ir_type {
67   IR_GIMPLE,
68   IR_RTL_CFGRTL,
69   IR_RTL_CFGLAYOUT
70 };
71
72 /* Provide forward struct declaration so that we don't have to include
73    all of cpplib.h whenever a random prototype includes a pointer.
74    Note that the cpp_reader and cpp_token typedefs remain part of
75    cpplib.h.  */
76
77 struct cpp_reader;
78 struct cpp_token;
79
80 /* The thread-local storage model associated with a given VAR_DECL
81    or SYMBOL_REF.  This isn't used much, but both trees and RTL refer
82    to it, so it's here.  */
83 enum tls_model {
84   TLS_MODEL_NONE,
85   TLS_MODEL_EMULATED,
86   TLS_MODEL_REAL,
87   TLS_MODEL_GLOBAL_DYNAMIC = TLS_MODEL_REAL,
88   TLS_MODEL_LOCAL_DYNAMIC,
89   TLS_MODEL_INITIAL_EXEC,
90   TLS_MODEL_LOCAL_EXEC
91 };
92
93 #else
94
95 struct _dont_use_rtx_here_;
96 struct _dont_use_rtvec_here_;
97 union _dont_use_tree_here_;
98 #define rtx struct _dont_use_rtx_here_ *
99 #define const_rtx struct _dont_use_rtx_here_ *
100 #define rtvec struct _dont_use_rtvec_here *
101 #define const_rtvec struct _dont_use_rtvec_here *
102 #define tree union _dont_use_tree_here_ *
103 #define const_tree union _dont_use_tree_here_ *
104
105 #endif
106
107 #endif /* coretypes.h */
108