]>
Commit | Line | Data |
---|---|---|
f938f60c | 1 | /* Compilation switch flag type definitions for GCC. |
cbe34bb5 | 2 | Copyright (C) 1987-2017 Free Software Foundation, Inc. |
f938f60c JM |
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 | #ifndef GCC_FLAG_TYPES_H | |
21 | #define GCC_FLAG_TYPES_H | |
22 | ||
23 | enum debug_info_type | |
24 | { | |
25 | NO_DEBUG, /* Write no debug info. */ | |
26 | DBX_DEBUG, /* Write BSD .stabs for DBX (using dbxout.c). */ | |
27 | SDB_DEBUG, /* Write COFF for (old) SDB (using sdbout.c). */ | |
28 | DWARF2_DEBUG, /* Write Dwarf v2 debug info (using dwarf2out.c). */ | |
29 | XCOFF_DEBUG, /* Write IBM/Xcoff debug info (using dbxout.c). */ | |
30 | VMS_DEBUG, /* Write VMS debug info (using vmsdbgout.c). */ | |
31 | VMS_AND_DWARF2_DEBUG /* Write VMS debug info (using vmsdbgout.c). | |
32 | and DWARF v2 debug info (using dwarf2out.c). */ | |
33 | }; | |
34 | ||
0576d21f | 35 | enum debug_info_levels |
f938f60c JM |
36 | { |
37 | DINFO_LEVEL_NONE, /* Write no debugging info. */ | |
38 | DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */ | |
39 | DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */ | |
40 | DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */ | |
41 | }; | |
42 | ||
43 | /* A major contribution to object and executable size is debug | |
44 | information size. A major contribution to debug information | |
45 | size is struct descriptions replicated in several object files. | |
46 | The following function determines whether or not debug information | |
47 | should be generated for a given struct. The indirect parameter | |
48 | indicates that the struct is being handled indirectly, via | |
49 | a pointer. See opts.c for the implementation. */ | |
50 | ||
51 | enum debug_info_usage | |
52 | { | |
53 | DINFO_USAGE_DFN, /* A struct definition. */ | |
54 | DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */ | |
55 | DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */ | |
56 | DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */ | |
57 | }; | |
58 | ||
69ccdddb JM |
59 | /* A major contribution to object and executable size is debug |
60 | information size. A major contribution to debug information size | |
61 | is struct descriptions replicated in several object files. The | |
62 | following flags attempt to reduce this information. The basic | |
63 | idea is to not emit struct debugging information in the current | |
64 | compilation unit when that information will be generated by | |
65 | another compilation unit. | |
66 | ||
67 | Debug information for a struct defined in the current source | |
68 | file should be generated in the object file. Likewise the | |
69 | debug information for a struct defined in a header should be | |
70 | generated in the object file of the corresponding source file. | |
71 | Both of these case are handled when the base name of the file of | |
72 | the struct definition matches the base name of the source file | |
73 | of the current compilation unit. This matching emits minimal | |
74 | struct debugging information. | |
75 | ||
76 | The base file name matching rule above will fail to emit debug | |
77 | information for structs defined in system headers. So a second | |
78 | category of files includes system headers in addition to files | |
79 | with matching bases. | |
80 | ||
81 | The remaining types of files are library headers and application | |
82 | headers. We cannot currently distinguish these two types. */ | |
83 | ||
84 | enum debug_struct_file | |
85 | { | |
86 | DINFO_STRUCT_FILE_NONE, /* Debug no structs. */ | |
87 | DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the | |
88 | same base name as the compilation unit. */ | |
89 | DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system | |
90 | header files. */ | |
91 | DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */ | |
92 | }; | |
93 | ||
6592d14b PMR |
94 | /* Balance between GNAT encodings and standard DWARF to emit. */ |
95 | ||
96 | enum dwarf_gnat_encodings | |
97 | { | |
98 | DWARF_GNAT_ENCODINGS_ALL = 0, /* Emit all GNAT encodings, then emit as | |
99 | much standard DWARF as possible so it | |
100 | does not conflict with GNAT | |
101 | encodings. */ | |
102 | DWARF_GNAT_ENCODINGS_GDB = 1, /* Emit as much standard DWARF as possible | |
103 | as long as GDB handles them. Emit GNAT | |
104 | encodings for the rest. */ | |
105 | DWARF_GNAT_ENCODINGS_MINIMAL = 2 /* Emit all the standard DWARF we can. | |
106 | Emit GNAT encodings for the rest. */ | |
107 | }; | |
108 | ||
dcaaa5a0 DP |
109 | /* Enumerate Objective-c instance variable visibility settings. */ |
110 | ||
111 | enum ivar_visibility | |
112 | { | |
113 | IVAR_VISIBILITY_PRIVATE, | |
114 | IVAR_VISIBILITY_PROTECTED, | |
115 | IVAR_VISIBILITY_PUBLIC, | |
116 | IVAR_VISIBILITY_PACKAGE | |
117 | }; | |
118 | ||
87e2a8fd XDL |
119 | /* The stack reuse level. */ |
120 | enum stack_reuse_level | |
121 | { | |
122 | SR_NONE, | |
123 | SR_NAMED_VARS, | |
124 | SR_ALL | |
125 | }; | |
126 | ||
59faab7c SB |
127 | /* The algorithm used for basic block reordering. */ |
128 | enum reorder_blocks_algorithm | |
129 | { | |
130 | REORDER_BLOCKS_ALGORITHM_SIMPLE, | |
131 | REORDER_BLOCKS_ALGORITHM_STC | |
132 | }; | |
133 | ||
f938f60c JM |
134 | /* The algorithm used for the integrated register allocator (IRA). */ |
135 | enum ira_algorithm | |
136 | { | |
137 | IRA_ALGORITHM_CB, | |
138 | IRA_ALGORITHM_PRIORITY | |
139 | }; | |
140 | ||
141 | /* The regions used for the integrated register allocator (IRA). */ | |
142 | enum ira_region | |
143 | { | |
144 | IRA_REGION_ONE, | |
145 | IRA_REGION_ALL, | |
ffe8727f VM |
146 | IRA_REGION_MIXED, |
147 | /* This value means that there were no options -fira-region on the | |
148 | command line and that we should choose a value depending on the | |
149 | used -O option. */ | |
150 | IRA_REGION_AUTODETECT | |
f938f60c JM |
151 | }; |
152 | ||
153 | /* The options for excess precision. */ | |
154 | enum excess_precision | |
155 | { | |
156 | EXCESS_PRECISION_DEFAULT, | |
157 | EXCESS_PRECISION_FAST, | |
158 | EXCESS_PRECISION_STANDARD | |
159 | }; | |
160 | ||
04f0fcf7 JG |
161 | /* The options for which values of FLT_EVAL_METHOD are permissible. */ |
162 | enum permitted_flt_eval_methods | |
163 | { | |
164 | PERMITTED_FLT_EVAL_METHODS_DEFAULT, | |
165 | PERMITTED_FLT_EVAL_METHODS_TS_18661, | |
166 | PERMITTED_FLT_EVAL_METHODS_C11 | |
167 | }; | |
168 | ||
ee8f15c6 JL |
169 | /* Type of stack check. |
170 | ||
171 | Stack checking is designed to detect infinite recursion and stack | |
172 | overflows for Ada programs. Furthermore stack checking tries to ensure | |
173 | in that scenario that enough stack space is left to run a signal handler. | |
174 | ||
175 | -fstack-check= does not prevent stack-clash style attacks. For that | |
176 | you want -fstack-clash-protection. */ | |
f938f60c JM |
177 | enum stack_check_type |
178 | { | |
179 | /* Do not check the stack. */ | |
180 | NO_STACK_CHECK = 0, | |
181 | ||
182 | /* Check the stack generically, i.e. assume no specific support | |
183 | from the target configuration files. */ | |
184 | GENERIC_STACK_CHECK, | |
185 | ||
186 | /* Check the stack and rely on the target configuration files to | |
187 | check the static frame of functions, i.e. use the generic | |
188 | mechanism only for dynamic stack allocations. */ | |
189 | STATIC_BUILTIN_STACK_CHECK, | |
190 | ||
191 | /* Check the stack and entirely rely on the target configuration | |
192 | files, i.e. do not use the generic mechanism at all. */ | |
193 | FULL_BUILTIN_STACK_CHECK | |
194 | }; | |
195 | ||
16949072 RG |
196 | /* Floating-point contraction mode. */ |
197 | enum fp_contract_mode { | |
198 | FP_CONTRACT_OFF = 0, | |
199 | FP_CONTRACT_ON = 1, | |
200 | FP_CONTRACT_FAST = 2 | |
201 | }; | |
202 | ||
ee45a32d EB |
203 | /* Scalar storage order kind. */ |
204 | enum scalar_storage_order_kind { | |
205 | SSO_NATIVE = 0, | |
206 | SSO_BIG_ENDIAN, | |
207 | SSO_LITTLE_ENDIAN | |
208 | }; | |
209 | ||
d6d11272 XDL |
210 | /* Vectorizer cost-model. */ |
211 | enum vect_cost_model { | |
212 | VECT_COST_MODEL_UNLIMITED = 0, | |
213 | VECT_COST_MODEL_CHEAP = 1, | |
214 | VECT_COST_MODEL_DYNAMIC = 2, | |
215 | VECT_COST_MODEL_DEFAULT = 3 | |
216 | }; | |
217 | ||
de5a5fa1 MP |
218 | /* Different instrumentation modes. */ |
219 | enum sanitize_code { | |
220 | /* AddressSanitizer. */ | |
5cc6c41c ML |
221 | SANITIZE_ADDRESS = 1UL << 0, |
222 | SANITIZE_USER_ADDRESS = 1UL << 1, | |
223 | SANITIZE_KERNEL_ADDRESS = 1UL << 2, | |
de5a5fa1 | 224 | /* ThreadSanitizer. */ |
5cc6c41c | 225 | SANITIZE_THREAD = 1UL << 3, |
9065ada9 | 226 | /* LeakSanitizer. */ |
5cc6c41c | 227 | SANITIZE_LEAK = 1UL << 4, |
de5a5fa1 | 228 | /* UndefinedBehaviorSanitizer. */ |
2e955d50 JJ |
229 | SANITIZE_SHIFT_BASE = 1UL << 5, |
230 | SANITIZE_SHIFT_EXPONENT = 1UL << 6, | |
231 | SANITIZE_DIVIDE = 1UL << 7, | |
232 | SANITIZE_UNREACHABLE = 1UL << 8, | |
233 | SANITIZE_VLA = 1UL << 9, | |
234 | SANITIZE_NULL = 1UL << 10, | |
235 | SANITIZE_RETURN = 1UL << 11, | |
236 | SANITIZE_SI_OVERFLOW = 1UL << 12, | |
237 | SANITIZE_BOOL = 1UL << 13, | |
238 | SANITIZE_ENUM = 1UL << 14, | |
239 | SANITIZE_FLOAT_DIVIDE = 1UL << 15, | |
240 | SANITIZE_FLOAT_CAST = 1UL << 16, | |
241 | SANITIZE_BOUNDS = 1UL << 17, | |
242 | SANITIZE_ALIGNMENT = 1UL << 18, | |
243 | SANITIZE_NONNULL_ATTRIBUTE = 1UL << 19, | |
244 | SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 20, | |
245 | SANITIZE_OBJECT_SIZE = 1UL << 21, | |
246 | SANITIZE_VPTR = 1UL << 22, | |
247 | SANITIZE_BOUNDS_STRICT = 1UL << 23, | |
c9b39a49 | 248 | SANITIZE_POINTER_OVERFLOW = 1UL << 24, |
07d7c611 | 249 | SANITIZE_BUILTIN = 1UL << 25, |
2e955d50 | 250 | SANITIZE_SHIFT = SANITIZE_SHIFT_BASE | SANITIZE_SHIFT_EXPONENT, |
de5a5fa1 | 251 | SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE |
0a508bb6 | 252 | | SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN |
0e37a2f3 | 253 | | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM |
126edc3f JJ |
254 | | SANITIZE_BOUNDS | SANITIZE_ALIGNMENT |
255 | | SANITIZE_NONNULL_ATTRIBUTE | |
0e82f089 | 256 | | SANITIZE_RETURNS_NONNULL_ATTRIBUTE |
c9b39a49 | 257 | | SANITIZE_OBJECT_SIZE | SANITIZE_VPTR |
07d7c611 | 258 | | SANITIZE_POINTER_OVERFLOW | SANITIZE_BUILTIN, |
45b2222a ML |
259 | SANITIZE_UNDEFINED_NONDEFAULT = SANITIZE_FLOAT_DIVIDE | SANITIZE_FLOAT_CAST |
260 | | SANITIZE_BOUNDS_STRICT | |
de5a5fa1 MP |
261 | }; |
262 | ||
f6e50a7d WW |
263 | /* Different trace modes. */ |
264 | enum sanitize_coverage_code { | |
265 | /* Trace PC. */ | |
266 | SANITIZE_COV_TRACE_PC = 1 << 0, | |
267 | /* Trace Comparison. */ | |
268 | SANITIZE_COV_TRACE_CMP = 1 << 1 | |
269 | }; | |
270 | ||
2077db1b CT |
271 | /* flag_vtable_verify initialization levels. */ |
272 | enum vtv_priority { | |
273 | VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */ | |
274 | VTV_STANDARD_PRIORITY = 1, | |
275 | VTV_PREINIT_PRIORITY = 2 | |
276 | }; | |
783dab6b RB |
277 | |
278 | /* flag_lto_partition initialization values. */ | |
279 | enum lto_partition_model { | |
280 | LTO_PARTITION_NONE = 0, | |
281 | LTO_PARTITION_ONE = 1, | |
282 | LTO_PARTITION_BALANCED = 2, | |
283 | LTO_PARTITION_1TO1 = 3, | |
284 | LTO_PARTITION_MAX = 4 | |
285 | }; | |
286 | ||
1ff9ed6f JH |
287 | /* flag_lto_linker_output initialization values. */ |
288 | enum lto_linker_output { | |
289 | LTO_LINKER_OUTPUT_UNKNOWN, | |
290 | LTO_LINKER_OUTPUT_REL, | |
291 | LTO_LINKER_OUTPUT_DYN, | |
292 | LTO_LINKER_OUTPUT_PIE, | |
293 | LTO_LINKER_OUTPUT_EXEC | |
294 | }; | |
f19626cf TB |
295 | |
296 | /* gfortran -finit-real= values. */ | |
297 | ||
298 | enum gfc_init_local_real | |
299 | { | |
300 | GFC_INIT_REAL_OFF = 0, | |
301 | GFC_INIT_REAL_ZERO, | |
302 | GFC_INIT_REAL_NAN, | |
303 | GFC_INIT_REAL_SNAN, | |
304 | GFC_INIT_REAL_INF, | |
305 | GFC_INIT_REAL_NEG_INF | |
306 | }; | |
307 | ||
308 | /* gfortran -fcoarray= values. */ | |
309 | ||
310 | enum gfc_fcoarray | |
311 | { | |
312 | GFC_FCOARRAY_NONE = 0, | |
313 | GFC_FCOARRAY_SINGLE, | |
314 | GFC_FCOARRAY_LIB | |
315 | }; | |
316 | ||
317 | ||
318 | /* gfortran -fconvert= values; used for unformatted I/O. | |
319 | Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */ | |
320 | enum gfc_convert | |
321 | { | |
322 | GFC_FLAG_CONVERT_NATIVE = 0, | |
323 | GFC_FLAG_CONVERT_SWAP, | |
324 | GFC_FLAG_CONVERT_BIG, | |
325 | GFC_FLAG_CONVERT_LITTLE | |
326 | }; | |
327 | ||
328 | ||
f938f60c | 329 | #endif /* ! GCC_FLAG_TYPES_H */ |