]>
Commit | Line | Data |
---|---|---|
f938f60c | 1 | /* Compilation switch flag type definitions for GCC. |
d1e082c2 | 2 | Copyright (C) 1987-2013 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 | ||
f938f60c JM |
94 | /* Enumerate visibility settings. This is deliberately ordered from most |
95 | to least visibility. */ | |
96 | #ifndef SYMBOL_VISIBILITY_DEFINED | |
97 | #define SYMBOL_VISIBILITY_DEFINED | |
98 | enum symbol_visibility | |
99 | { | |
100 | VISIBILITY_DEFAULT, | |
101 | VISIBILITY_PROTECTED, | |
102 | VISIBILITY_HIDDEN, | |
103 | VISIBILITY_INTERNAL | |
104 | }; | |
105 | #endif | |
106 | ||
87e2a8fd XDL |
107 | /* The stack reuse level. */ |
108 | enum stack_reuse_level | |
109 | { | |
110 | SR_NONE, | |
111 | SR_NAMED_VARS, | |
112 | SR_ALL | |
113 | }; | |
114 | ||
f938f60c JM |
115 | /* The algorithm used for the integrated register allocator (IRA). */ |
116 | enum ira_algorithm | |
117 | { | |
118 | IRA_ALGORITHM_CB, | |
119 | IRA_ALGORITHM_PRIORITY | |
120 | }; | |
121 | ||
122 | /* The regions used for the integrated register allocator (IRA). */ | |
123 | enum ira_region | |
124 | { | |
125 | IRA_REGION_ONE, | |
126 | IRA_REGION_ALL, | |
ffe8727f VM |
127 | IRA_REGION_MIXED, |
128 | /* This value means that there were no options -fira-region on the | |
129 | command line and that we should choose a value depending on the | |
130 | used -O option. */ | |
131 | IRA_REGION_AUTODETECT | |
f938f60c JM |
132 | }; |
133 | ||
134 | /* The options for excess precision. */ | |
135 | enum excess_precision | |
136 | { | |
137 | EXCESS_PRECISION_DEFAULT, | |
138 | EXCESS_PRECISION_FAST, | |
139 | EXCESS_PRECISION_STANDARD | |
140 | }; | |
141 | ||
f938f60c JM |
142 | /* Type of stack check. */ |
143 | enum stack_check_type | |
144 | { | |
145 | /* Do not check the stack. */ | |
146 | NO_STACK_CHECK = 0, | |
147 | ||
148 | /* Check the stack generically, i.e. assume no specific support | |
149 | from the target configuration files. */ | |
150 | GENERIC_STACK_CHECK, | |
151 | ||
152 | /* Check the stack and rely on the target configuration files to | |
153 | check the static frame of functions, i.e. use the generic | |
154 | mechanism only for dynamic stack allocations. */ | |
155 | STATIC_BUILTIN_STACK_CHECK, | |
156 | ||
157 | /* Check the stack and entirely rely on the target configuration | |
158 | files, i.e. do not use the generic mechanism at all. */ | |
159 | FULL_BUILTIN_STACK_CHECK | |
160 | }; | |
161 | ||
162 | /* Names for the different levels of -Wstrict-overflow=N. The numeric | |
163 | values here correspond to N. */ | |
164 | ||
165 | enum warn_strict_overflow_code | |
166 | { | |
167 | /* Overflow warning that should be issued with -Wall: a questionable | |
168 | construct that is easy to avoid even when using macros. Example: | |
169 | folding (x + CONSTANT > x) to 1. */ | |
170 | WARN_STRICT_OVERFLOW_ALL = 1, | |
171 | /* Overflow warning about folding a comparison to a constant because | |
172 | of undefined signed overflow, other than cases covered by | |
173 | WARN_STRICT_OVERFLOW_ALL. Example: folding (abs (x) >= 0) to 1 | |
174 | (this is false when x == INT_MIN). */ | |
175 | WARN_STRICT_OVERFLOW_CONDITIONAL = 2, | |
176 | /* Overflow warning about changes to comparisons other than folding | |
177 | them to a constant. Example: folding (x + 1 > 1) to (x > 0). */ | |
178 | WARN_STRICT_OVERFLOW_COMPARISON = 3, | |
179 | /* Overflow warnings not covered by the above cases. Example: | |
180 | folding ((x * 10) / 5) to (x * 2). */ | |
181 | WARN_STRICT_OVERFLOW_MISC = 4, | |
182 | /* Overflow warnings about reducing magnitude of constants in | |
183 | comparison. Example: folding (x + 2 > y) to (x + 1 >= y). */ | |
184 | WARN_STRICT_OVERFLOW_MAGNITUDE = 5 | |
185 | }; | |
186 | ||
16949072 RG |
187 | /* Floating-point contraction mode. */ |
188 | enum fp_contract_mode { | |
189 | FP_CONTRACT_OFF = 0, | |
190 | FP_CONTRACT_ON = 1, | |
191 | FP_CONTRACT_FAST = 2 | |
192 | }; | |
193 | ||
d6d11272 XDL |
194 | /* Vectorizer cost-model. */ |
195 | enum vect_cost_model { | |
196 | VECT_COST_MODEL_UNLIMITED = 0, | |
197 | VECT_COST_MODEL_CHEAP = 1, | |
198 | VECT_COST_MODEL_DYNAMIC = 2, | |
199 | VECT_COST_MODEL_DEFAULT = 3 | |
200 | }; | |
201 | ||
202 | ||
de5a5fa1 MP |
203 | /* Different instrumentation modes. */ |
204 | enum sanitize_code { | |
205 | /* AddressSanitizer. */ | |
206 | SANITIZE_ADDRESS = 1 << 0, | |
207 | /* ThreadSanitizer. */ | |
208 | SANITIZE_THREAD = 1 << 1, | |
209 | /* UndefinedBehaviorSanitizer. */ | |
210 | SANITIZE_SHIFT = 1 << 2, | |
211 | SANITIZE_DIVIDE = 1 << 3, | |
212 | SANITIZE_UNREACHABLE = 1 << 4, | |
b906f4ca | 213 | SANITIZE_VLA = 1 << 5, |
b9a55b13 | 214 | SANITIZE_NULL = 1 << 6, |
de5a5fa1 | 215 | SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE |
b9a55b13 | 216 | | SANITIZE_VLA | SANITIZE_NULL |
de5a5fa1 MP |
217 | }; |
218 | ||
2077db1b CT |
219 | /* flag_vtable_verify initialization levels. */ |
220 | enum vtv_priority { | |
221 | VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */ | |
222 | VTV_STANDARD_PRIORITY = 1, | |
223 | VTV_PREINIT_PRIORITY = 2 | |
224 | }; | |
f938f60c | 225 | #endif /* ! GCC_FLAG_TYPES_H */ |