0
|
1 /* GCC core type declarations.
|
|
2 Copyright (C) 2002, 2004, 2007, 2008, 2009 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 Under Section 7 of GPL version 3, you are granted additional
|
|
17 permissions described in the GCC Runtime Library Exception, version
|
|
18 3.1, as published by the Free Software Foundation.
|
|
19
|
|
20 You should have received a copy of the GNU General Public License and
|
|
21 a copy of the GCC Runtime Library Exception along with this program;
|
|
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
23 <http://www.gnu.org/licenses/>. */
|
|
24
|
|
25 /* Provide forward declarations of core types which are referred to by
|
|
26 most of the compiler. This allows header files to use these types
|
|
27 (e.g. in function prototypes) without concern for whether the full
|
|
28 definitions are visible. Some other declarations that need to be
|
|
29 universally visible are here, too.
|
|
30
|
|
31 In the context of tconfig.h, most of these have special definitions
|
|
32 which prevent them from being used except in further type
|
|
33 declarations. This is a kludge; the right thing is to avoid
|
|
34 including the "tm.h" header set in the context of tconfig.h, but
|
|
35 we're not there yet. */
|
|
36
|
|
37 #ifndef GCC_CORETYPES_H
|
|
38 #define GCC_CORETYPES_H
|
|
39
|
|
40 #define GTY(x) /* nothing - marker for gengtype */
|
|
41
|
|
42 #ifndef USED_FOR_TARGET
|
|
43
|
|
44 struct bitmap_head_def;
|
|
45 typedef struct bitmap_head_def *bitmap;
|
|
46 typedef const struct bitmap_head_def *const_bitmap;
|
|
47 struct rtx_def;
|
|
48 typedef struct rtx_def *rtx;
|
|
49 typedef const struct rtx_def *const_rtx;
|
|
50 struct rtvec_def;
|
|
51 typedef struct rtvec_def *rtvec;
|
|
52 typedef const struct rtvec_def *const_rtvec;
|
|
53 union tree_node;
|
|
54 typedef union tree_node *tree;
|
|
55 union gimple_statement_d;
|
|
56 typedef union gimple_statement_d *gimple;
|
|
57 typedef const union tree_node *const_tree;
|
|
58 typedef const union gimple_statement_d *const_gimple;
|
|
59 union section;
|
|
60 typedef union section section;
|
|
61 struct cl_target_option;
|
|
62 struct cl_optimization;
|
|
63 struct gimple_seq_d;
|
|
64 typedef struct gimple_seq_d *gimple_seq;
|
|
65 typedef const struct gimple_seq_d *const_gimple_seq;
|
|
66 struct gimple_seq_node_d;
|
|
67 typedef struct gimple_seq_node_d *gimple_seq_node;
|
|
68 typedef const struct gimple_seq_node_d *const_gimple_seq_node;
|
|
69
|
|
70 /* The major intermediate representations of GCC. */
|
|
71 enum ir_type {
|
|
72 IR_GIMPLE,
|
|
73 IR_RTL_CFGRTL,
|
|
74 IR_RTL_CFGLAYOUT
|
|
75 };
|
|
76
|
|
77 /* Provide forward struct declaration so that we don't have to include
|
|
78 all of cpplib.h whenever a random prototype includes a pointer.
|
|
79 Note that the cpp_reader and cpp_token typedefs remain part of
|
|
80 cpplib.h. */
|
|
81
|
|
82 struct cpp_reader;
|
|
83 struct cpp_token;
|
|
84
|
|
85 /* The thread-local storage model associated with a given VAR_DECL
|
|
86 or SYMBOL_REF. This isn't used much, but both trees and RTL refer
|
|
87 to it, so it's here. */
|
|
88 enum tls_model {
|
|
89 TLS_MODEL_NONE,
|
|
90 TLS_MODEL_EMULATED,
|
|
91 TLS_MODEL_REAL,
|
|
92 TLS_MODEL_GLOBAL_DYNAMIC = TLS_MODEL_REAL,
|
|
93 TLS_MODEL_LOCAL_DYNAMIC,
|
|
94 TLS_MODEL_INITIAL_EXEC,
|
|
95 TLS_MODEL_LOCAL_EXEC
|
|
96 };
|
|
97
|
|
98 #else
|
|
99
|
|
100 struct _dont_use_rtx_here_;
|
|
101 struct _dont_use_rtvec_here_;
|
|
102 union _dont_use_tree_here_;
|
|
103 #define rtx struct _dont_use_rtx_here_ *
|
|
104 #define const_rtx struct _dont_use_rtx_here_ *
|
|
105 #define rtvec struct _dont_use_rtvec_here *
|
|
106 #define const_rtvec struct _dont_use_rtvec_here *
|
|
107 #define tree union _dont_use_tree_here_ *
|
|
108 #define const_tree union _dont_use_tree_here_ *
|
|
109
|
|
110 #endif
|
|
111
|
|
112 #endif /* coretypes.h */
|
|
113
|