Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | pmbaty | 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
2 | |* *| |
||
3 | |* Code to implement the __has_attribute logic *| |
||
4 | |* *| |
||
5 | |* Automatically generated file, do not edit! *| |
||
6 | |* *| |
||
7 | \*===----------------------------------------------------------------------===*/ |
||
8 | |||
9 | const llvm::Triple &T = Target.getTriple(); |
||
10 | switch (Syntax) { |
||
11 | case AttributeCommonInfo::Syntax::AS_GNU: |
||
12 | return llvm::StringSwitch<int>(Name) |
||
13 | .Case("aarch64_sve_pcs", 1) |
||
14 | .Case("aarch64_vector_pcs", 1) |
||
15 | .Case("amdgpu_flat_work_group_size", 1) |
||
16 | .Case("amdgpu_kernel", 1) |
||
17 | .Case("amdgpu_num_sgpr", 1) |
||
18 | .Case("amdgpu_num_vgpr", 1) |
||
19 | .Case("amdgpu_waves_per_eu", 1) |
||
20 | .Case("interrupt", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) ? 1 : 0) |
||
21 | .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) ? 1 : 0) |
||
22 | .Case("signal", true && (T.getArch() == llvm::Triple::avr) ? 1 : 0) |
||
23 | .Case("abi_tag", 1) |
||
24 | .Case("acquire_capability", 1) |
||
25 | .Case("acquire_shared_capability", 1) |
||
26 | .Case("exclusive_lock_function", 1) |
||
27 | .Case("shared_lock_function", 1) |
||
28 | .Case("acquire_capability", 1) |
||
29 | .Case("acquire_shared_capability", 1) |
||
30 | .Case("exclusive_lock_function", 1) |
||
31 | .Case("shared_lock_function", 1) |
||
32 | .Case("acquire_capability", 1) |
||
33 | .Case("acquire_shared_capability", 1) |
||
34 | .Case("exclusive_lock_function", 1) |
||
35 | .Case("shared_lock_function", 1) |
||
36 | .Case("acquire_capability", 1) |
||
37 | .Case("acquire_shared_capability", 1) |
||
38 | .Case("exclusive_lock_function", 1) |
||
39 | .Case("shared_lock_function", 1) |
||
40 | .Case("acquire_handle", 1) |
||
41 | .Case("acquired_after", 1) |
||
42 | .Case("acquired_before", 1) |
||
43 | .Case("address_space", 1) |
||
44 | .Case("alias", 1) |
||
45 | .Case("align_value", 1) |
||
46 | .Case("aligned", 1) |
||
47 | .Case("alloc_align", 1) |
||
48 | .Case("alloc_size", 1) |
||
49 | .Case("always_destroy", 1) |
||
50 | .Case("always_inline", 1) |
||
51 | .Case("analyzer_noreturn", 1) |
||
52 | .Case("annotate", 1) |
||
53 | .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0) |
||
54 | .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0) |
||
55 | .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0) |
||
56 | .Case("objc_arc_weak_reference_unavailable", 1) |
||
57 | .Case("argument_with_type_tag", 1) |
||
58 | .Case("pointer_with_type_tag", 1) |
||
59 | .Case("argument_with_type_tag", 1) |
||
60 | .Case("pointer_with_type_tag", 1) |
||
61 | .Case("__clang_arm_builtin_alias", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb || T.getArch() == llvm::Triple::aarch64) ? 1 : 0) |
||
62 | .Case("__clang_arm_mve_strict_polymorphism", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) ? 1 : 0) |
||
63 | .Case("arm_sve_vector_bits", 1) |
||
64 | .Case("artificial", 1) |
||
65 | .Case("assert_capability", 1) |
||
66 | .Case("assert_shared_capability", 1) |
||
67 | .Case("assert_capability", 1) |
||
68 | .Case("assert_shared_capability", 1) |
||
69 | .Case("assert_exclusive_lock", 1) |
||
70 | .Case("assert_shared_lock", 1) |
||
71 | .Case("assume_aligned", 1) |
||
72 | .Case("assume", 1) |
||
73 | .Case("availability", 1) |
||
74 | .Case("preserve_access_index", true && (T.getArch() == llvm::Triple::bpfel || T.getArch() == llvm::Triple::bpfeb) ? 1 : 0) |
||
75 | .Case("btf_decl_tag", 1) |
||
76 | .Case("btf_type_tag", 1) |
||
77 | .Case("blocks", 1) |
||
78 | .Case("bounded", 1) |
||
79 | .Case("clang_builtin_alias", 1) |
||
80 | .Case("cdecl", 1) |
||
81 | .Case("cf_audited_transfer", 1) |
||
82 | .Case("cf_consumed", 1) |
||
83 | .Case("guard", true && (T.getOS() == llvm::Triple::Win32) ? 1 : 0) |
||
84 | .Case("cfi_canonical_jump_table", 1) |
||
85 | .Case("cf_returns_not_retained", 1) |
||
86 | .Case("cf_returns_retained", 1) |
||
87 | .Case("cf_unknown_transfer", 1) |
||
88 | .Case("cpu_dispatch", 1) |
||
89 | .Case("cpu_specific", 1) |
||
90 | .Case("constant", 1) |
||
91 | .Case("cudart_builtin", 1) |
||
92 | .Case("device", 1) |
||
93 | .Case("device_builtin", 1) |
||
94 | .Case("device_builtin_surface_type", 1) |
||
95 | .Case("device_builtin_texture_type", 1) |
||
96 | .Case("global", 1) |
||
97 | .Case("host", 1) |
||
98 | .Case("launch_bounds", 1) |
||
99 | .Case("shared", 1) |
||
100 | .Case("callable_when", 1) |
||
101 | .Case("callback", 1) |
||
102 | .Case("called_once", 1) |
||
103 | .Case("capability", 1) |
||
104 | .Case("shared_capability", 1) |
||
105 | .Case("capability", 1) |
||
106 | .Case("shared_capability", 1) |
||
107 | .Case("carries_dependency", 1) |
||
108 | .Case("cleanup", 1) |
||
109 | .Case("cmse_nonsecure_call", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) ? 1 : 0) |
||
110 | .Case("cmse_nonsecure_entry", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) ? 1 : 0) |
||
111 | .Case("cold", 1) |
||
112 | .Case("common", 1) |
||
113 | .Case("const", 1) |
||
114 | .Case("__const", 1) |
||
115 | .Case("const", 1) |
||
116 | .Case("__const", 1) |
||
117 | .Case("require_constant_initialization", 1) |
||
118 | .Case("constructor", 1) |
||
119 | .Case("consumable", 1) |
||
120 | .Case("consumable_auto_cast_state", 1) |
||
121 | .Case("consumable_set_state_on_read", 1) |
||
122 | .Case("convergent", 1) |
||
123 | .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0) |
||
124 | .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0) |
||
125 | .Case("deprecated", 1) |
||
126 | .Case("destructor", 1) |
||
127 | .Case("diagnose_as_builtin", 1) |
||
128 | .Case("diagnose_if", 1) |
||
129 | .Case("disable_sanitizer_instrumentation", 1) |
||
130 | .Case("disable_tail_calls", 1) |
||
131 | .Case("enable_if", 1) |
||
132 | .Case("enforce_tcb", 1) |
||
133 | .Case("enforce_tcb_leaf", 1) |
||
134 | .Case("enum_extensibility", 1) |
||
135 | .Case("error", 1) |
||
136 | .Case("warning", 1) |
||
137 | .Case("error", 1) |
||
138 | .Case("warning", 1) |
||
139 | .Case("exclude_from_explicit_instantiation", 1) |
||
140 | .Case("exclusive_trylock_function", 1) |
||
141 | .Case("ext_vector_type", 1) |
||
142 | .Case("external_source_symbol", 1) |
||
143 | .Case("fallthrough", 1) |
||
144 | .Case("fastcall", 1) |
||
145 | .Case("flag_enum", 1) |
||
146 | .Case("flatten", 1) |
||
147 | .Case("format", 1) |
||
148 | .Case("format_arg", 1) |
||
149 | .Case("function_return", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0) |
||
150 | .Case("gnu_inline", 1) |
||
151 | .Case("guarded_by", 1) |
||
152 | .Case("guarded_var", 1) |
||
153 | .Case("managed", 1) |
||
154 | .Case("hot", 1) |
||
155 | .Case("ibaction", 1) |
||
156 | .Case("iboutlet", 1) |
||
157 | .Case("iboutletcollection", 1) |
||
158 | .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) ? 1 : 0) |
||
159 | .Case("init_priority", true && ( !Target.getTriple().isOSzOS() ) ? 1 : 0) |
||
160 | .Case("intel_ocl_bicc", 1) |
||
161 | .Case("internal_linkage", 1) |
||
162 | .Case("lto_visibility_public", 1) |
||
163 | .Case("leaf", 1) |
||
164 | .Case("lifetimebound", 1) |
||
165 | .Case("loader_uninitialized", 1) |
||
166 | .Case("lock_returned", 1) |
||
167 | .Case("lockable", 1) |
||
168 | .Case("locks_excluded", 1) |
||
169 | .Case("interrupt", true && (T.getArch() == llvm::Triple::m68k) ? 1 : 0) |
||
170 | .Case("mig_server_routine", 1) |
||
171 | .Case("ms_abi", 1) |
||
172 | .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) ? 1 : 0) |
||
173 | .Case("ms_struct", 1) |
||
174 | .Case("matrix_type", 1) |
||
175 | .Case("may_alias", 1) |
||
176 | .Case("maybe_undef", 1) |
||
177 | .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0) |
||
178 | .Case("minsize", 1) |
||
179 | .Case("min_vector_width", 1) |
||
180 | .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0) |
||
181 | .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0) |
||
182 | .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
183 | .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
184 | .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
185 | .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
186 | .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
187 | .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
188 | .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
189 | .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) ? 1 : 0) |
||
190 | .Case("mode", 1) |
||
191 | .Case("musttail", 1) |
||
192 | .Case("ns_consumed", 1) |
||
193 | .Case("ns_consumes_self", 1) |
||
194 | .Case("ns_error_domain", 1) |
||
195 | .Case("ns_returns_autoreleased", 1) |
||
196 | .Case("ns_returns_not_retained", 1) |
||
197 | .Case("ns_returns_retained", 1) |
||
198 | .Case("naked", 1) |
||
199 | .Case("neon_polyvector_type", 1) |
||
200 | .Case("neon_vector_type", 1) |
||
201 | .Case("no_builtin", 1) |
||
202 | .Case("nocommon", 1) |
||
203 | .Case("nodebug", 1) |
||
204 | .Case("noderef", 1) |
||
205 | .Case("no_destroy", 1) |
||
206 | .Case("noduplicate", 1) |
||
207 | .Case("noescape", 1) |
||
208 | .Case("noinline", 1) |
||
209 | .Case("no_instrument_function", 1) |
||
210 | .Case("nomerge", 1) |
||
211 | .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0) |
||
212 | .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0) |
||
213 | .Case("no_profile_instrument_function", 1) |
||
214 | .Case("no_randomize_layout", 1) |
||
215 | .Case("noreturn", 1) |
||
216 | .Case("no_sanitize", 1) |
||
217 | .Case("no_address_safety_analysis", 1) |
||
218 | .Case("no_sanitize_address", 1) |
||
219 | .Case("no_sanitize_thread", 1) |
||
220 | .Case("no_sanitize_memory", 1) |
||
221 | .Case("no_address_safety_analysis", 1) |
||
222 | .Case("no_sanitize_address", 1) |
||
223 | .Case("no_sanitize_thread", 1) |
||
224 | .Case("no_sanitize_memory", 1) |
||
225 | .Case("no_address_safety_analysis", 1) |
||
226 | .Case("no_sanitize_address", 1) |
||
227 | .Case("no_sanitize_thread", 1) |
||
228 | .Case("no_sanitize_memory", 1) |
||
229 | .Case("no_address_safety_analysis", 1) |
||
230 | .Case("no_sanitize_address", 1) |
||
231 | .Case("no_sanitize_thread", 1) |
||
232 | .Case("no_sanitize_memory", 1) |
||
233 | .Case("no_speculative_load_hardening", 1) |
||
234 | .Case("no_split_stack", 1) |
||
235 | .Case("no_stack_protector", 1) |
||
236 | .Case("no_thread_safety_analysis", 1) |
||
237 | .Case("nothrow", 1) |
||
238 | .Case("nouwtable", 1) |
||
239 | .Case("nonnull", 1) |
||
240 | .Case("not_tail_called", 1) |
||
241 | .Case("nv_weak", 1) |
||
242 | .Case("os_consumed", 1) |
||
243 | .Case("os_consumes_this", 1) |
||
244 | .Case("os_returns_not_retained", 1) |
||
245 | .Case("os_returns_retained", 1) |
||
246 | .Case("os_returns_retained_on_non_zero", 1) |
||
247 | .Case("os_returns_retained_on_zero", 1) |
||
248 | .Case("objc_boxable", 1) |
||
249 | .Case("objc_bridge", 1) |
||
250 | .Case("objc_bridge_mutable", 1) |
||
251 | .Case("objc_bridge_related", 1) |
||
252 | .Case("objc_class_stub", 1) |
||
253 | .Case("objc_designated_initializer", 1) |
||
254 | .Case("objc_direct", 1) |
||
255 | .Case("objc_direct_members", 1) |
||
256 | .Case("objc_exception", 1) |
||
257 | .Case("objc_protocol_requires_explicit_implementation", 1) |
||
258 | .Case("objc_externally_retained", 1) |
||
259 | .Case("objc_gc", 1) |
||
260 | .Case("objc_independent_class", 1) |
||
261 | .Case("objc_method_family", 1) |
||
262 | .Case("NSObject", 1) |
||
263 | .Case("objc_nonlazy_class", 1) |
||
264 | .Case("objc_non_runtime_protocol", 1) |
||
265 | .Case("objc_ownership", 1) |
||
266 | .Case("objc_precise_lifetime", 1) |
||
267 | .Case("objc_requires_property_definitions", 1) |
||
268 | .Case("objc_requires_super", 1) |
||
269 | .Case("objc_returns_inner_pointer", 1) |
||
270 | .Case("objc_root_class", 1) |
||
271 | .Case("objc_runtime_name", 1) |
||
272 | .Case("objc_runtime_visible", 1) |
||
273 | .Case("objc_subclassing_restricted", 1) |
||
274 | .Case("opencl_constant", 1) |
||
275 | .Case("opencl_generic", 1) |
||
276 | .Case("opencl_global", 1) |
||
277 | .Case("opencl_global_device", 1) |
||
278 | .Case("opencl_global_host", 1) |
||
279 | .Case("intel_reqd_sub_group_size", 1) |
||
280 | .Case("opencl_local", 1) |
||
281 | .Case("nosvm", 1) |
||
282 | .Case("opencl_private", 1) |
||
283 | .Case("opencl_unroll_hint", 1) |
||
284 | .Case("optnone", 1) |
||
285 | .Case("overloadable", 1) |
||
286 | .Case("ownership_holds", 1) |
||
287 | .Case("ownership_returns", 1) |
||
288 | .Case("ownership_takes", 1) |
||
289 | .Case("ownership_holds", 1) |
||
290 | .Case("ownership_returns", 1) |
||
291 | .Case("ownership_takes", 1) |
||
292 | .Case("ownership_holds", 1) |
||
293 | .Case("ownership_returns", 1) |
||
294 | .Case("ownership_takes", 1) |
||
295 | .Case("packed", 1) |
||
296 | .Case("param_typestate", 1) |
||
297 | .Case("pascal", 1) |
||
298 | .Case("pass_object_size", 1) |
||
299 | .Case("pass_dynamic_object_size", 1) |
||
300 | .Case("pass_object_size", 1) |
||
301 | .Case("pass_dynamic_object_size", 1) |
||
302 | .Case("patchable_function_entry", true && (T.getArch() == llvm::Triple::aarch64 || T.getArch() == llvm::Triple::aarch64_be || T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64 || T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0) |
||
303 | .Case("pcs", 1) |
||
304 | .Case("preferred_name", 1) |
||
305 | .Case("preserve_all", 1) |
||
306 | .Case("preserve_most", 1) |
||
307 | .Case("pt_guarded_by", 1) |
||
308 | .Case("pt_guarded_var", 1) |
||
309 | .Case("pure", 1) |
||
310 | .Case("interrupt", true && (T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64) ? 1 : 0) |
||
311 | .Case("randomize_layout", 1) |
||
312 | .Case("enforce_read_only_placement", 1) |
||
313 | .Case("regcall", 1) |
||
314 | .Case("regparm", 1) |
||
315 | .Case("reinitializes", 1) |
||
316 | .Case("release_capability", 1) |
||
317 | .Case("release_shared_capability", 1) |
||
318 | .Case("release_generic_capability", 1) |
||
319 | .Case("unlock_function", 1) |
||
320 | .Case("release_capability", 1) |
||
321 | .Case("release_shared_capability", 1) |
||
322 | .Case("release_generic_capability", 1) |
||
323 | .Case("unlock_function", 1) |
||
324 | .Case("release_capability", 1) |
||
325 | .Case("release_shared_capability", 1) |
||
326 | .Case("release_generic_capability", 1) |
||
327 | .Case("unlock_function", 1) |
||
328 | .Case("release_capability", 1) |
||
329 | .Case("release_shared_capability", 1) |
||
330 | .Case("release_generic_capability", 1) |
||
331 | .Case("unlock_function", 1) |
||
332 | .Case("release_handle", 1) |
||
333 | .Case("kernel", 1) |
||
334 | .Case("reqd_work_group_size", 1) |
||
335 | .Case("requires_capability", 1) |
||
336 | .Case("exclusive_locks_required", 1) |
||
337 | .Case("requires_shared_capability", 1) |
||
338 | .Case("shared_locks_required", 1) |
||
339 | .Case("requires_capability", 1) |
||
340 | .Case("exclusive_locks_required", 1) |
||
341 | .Case("requires_shared_capability", 1) |
||
342 | .Case("shared_locks_required", 1) |
||
343 | .Case("requires_capability", 1) |
||
344 | .Case("exclusive_locks_required", 1) |
||
345 | .Case("requires_shared_capability", 1) |
||
346 | .Case("shared_locks_required", 1) |
||
347 | .Case("requires_capability", 1) |
||
348 | .Case("exclusive_locks_required", 1) |
||
349 | .Case("requires_shared_capability", 1) |
||
350 | .Case("shared_locks_required", 1) |
||
351 | .Case("malloc", 1) |
||
352 | .Case("retain", 1) |
||
353 | .Case("return_typestate", 1) |
||
354 | .Case("returns_nonnull", 1) |
||
355 | .Case("returns_twice", 1) |
||
356 | .Case("sycl_kernel", 1) |
||
357 | .Case("sycl_special_class", 1) |
||
358 | .Case("scoped_lockable", 1) |
||
359 | .Case("section", 1) |
||
360 | .Case("selectany", 1) |
||
361 | .Case("sentinel", 1) |
||
362 | .Case("set_typestate", 1) |
||
363 | .Case("shared_trylock_function", 1) |
||
364 | .Case("speculative_load_hardening", 1) |
||
365 | .Case("standalone_debug", 1) |
||
366 | .Case("stdcall", 1) |
||
367 | .Case("swift_async", 1) |
||
368 | .Case("swiftasynccall", 1) |
||
369 | .Case("swift_async_context", 1) |
||
370 | .Case("swift_async_error", 1) |
||
371 | .Case("swift_async_name", 1) |
||
372 | .Case("swift_attr", 1) |
||
373 | .Case("swift_bridge", 1) |
||
374 | .Case("swift_bridged_typedef", 1) |
||
375 | .Case("swiftcall", 1) |
||
376 | .Case("swift_context", 1) |
||
377 | .Case("swift_error", 1) |
||
378 | .Case("swift_error_result", 1) |
||
379 | .Case("swift_indirect_result", 1) |
||
380 | .Case("swift_name", 1) |
||
381 | .Case("swift_newtype", 1) |
||
382 | .Case("swift_wrapper", 1) |
||
383 | .Case("swift_newtype", 1) |
||
384 | .Case("swift_wrapper", 1) |
||
385 | .Case("swift_objc_members", 1) |
||
386 | .Case("swift_private", 1) |
||
387 | .Case("sysv_abi", 1) |
||
388 | .Case("tls_model", 1) |
||
389 | .Case("target", 1) |
||
390 | .Case("target_clones", 1) |
||
391 | .Case("target_version", 1) |
||
392 | .Case("test_typestate", 1) |
||
393 | .Case("thiscall", 1) |
||
394 | .Case("transparent_union", 1) |
||
395 | .Case("trivial_abi", 1) |
||
396 | .Case("try_acquire_capability", 1) |
||
397 | .Case("try_acquire_shared_capability", 1) |
||
398 | .Case("try_acquire_capability", 1) |
||
399 | .Case("try_acquire_shared_capability", 1) |
||
400 | .Case("type_tag_for_datatype", 1) |
||
401 | .Case("type_visibility", 1) |
||
402 | .Case("unavailable", 1) |
||
403 | .Case("uninitialized", 1) |
||
404 | .Case("unused", 1) |
||
405 | .Case("use_handle", 1) |
||
406 | .Case("used", 1) |
||
407 | .Case("using_if_exists", 1) |
||
408 | .Case("vecreturn", 1) |
||
409 | .Case("vec_type_hint", 1) |
||
410 | .Case("vectorcall", 1) |
||
411 | .Case("vector_size", 1) |
||
412 | .Case("visibility", 1) |
||
413 | .Case("warn_unused", 1) |
||
414 | .Case("warn_unused_result", 1) |
||
415 | .Case("weak", 1) |
||
416 | .Case("weak_import", 1) |
||
417 | .Case("weakref", 1) |
||
418 | .Case("export_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) ? 1 : 0) |
||
419 | .Case("import_module", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) ? 1 : 0) |
||
420 | .Case("import_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) ? 1 : 0) |
||
421 | .Case("work_group_size_hint", 1) |
||
422 | .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0) |
||
423 | .Case("xray_always_instrument", 1) |
||
424 | .Case("xray_never_instrument", 1) |
||
425 | .Case("xray_always_instrument", 1) |
||
426 | .Case("xray_never_instrument", 1) |
||
427 | .Case("xray_log_args", 1) |
||
428 | .Case("zero_call_used_regs", 1) |
||
429 | .Default(0); |
||
430 | case AttributeCommonInfo::Syntax::AS_Declspec: |
||
431 | return llvm::StringSwitch<int>(Name) |
||
432 | .Case("align", 1) |
||
433 | .Case("guard", true && (T.getOS() == llvm::Triple::Win32) ? 1 : 0) |
||
434 | .Case("cpu_dispatch", 1) |
||
435 | .Case("cpu_specific", 1) |
||
436 | .Case("__constant__", 1) |
||
437 | .Case("__cudart_builtin__", 1) |
||
438 | .Case("__device__", 1) |
||
439 | .Case("__device_builtin__", 1) |
||
440 | .Case("__device_builtin_surface_type__", 1) |
||
441 | .Case("__device_builtin_texture_type__", 1) |
||
442 | .Case("__global__", 1) |
||
443 | .Case("__host__", 1) |
||
444 | .Case("__launch_bounds__", 1) |
||
445 | .Case("__shared__", 1) |
||
446 | .Case("code_seg", 1) |
||
447 | .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0) |
||
448 | .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0) |
||
449 | .Case("deprecated", 1) |
||
450 | .Case("empty_bases", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && ( Target.getCXXABI().isMicrosoft() ) ? 1 : 0) |
||
451 | .Case("__managed__", 1) |
||
452 | .Case("layout_version", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && ( Target.getCXXABI().isMicrosoft() ) ? 1 : 0) |
||
453 | .Case("allocator", 1) |
||
454 | .Case("novtable", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64 || T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::aarch64) && ( Target.getCXXABI().isMicrosoft() ) ? 1 : 0) |
||
455 | .Case("naked", 1) |
||
456 | .Case("noalias", 1) |
||
457 | .Case("noinline", 1) |
||
458 | .Case("noreturn", 1) |
||
459 | .Case("safebuffers", 1) |
||
460 | .Case("nothrow", 1) |
||
461 | .Case("restrict", 1) |
||
462 | .Case("allocate", 1) |
||
463 | .Case("selectany", 1) |
||
464 | .Case("strict_gs_check", 1) |
||
465 | .Case("thread", 1) |
||
466 | .Case("uuid", 1) |
||
467 | .Case("property", 1) |
||
468 | .Default(0); |
||
469 | case AttributeCommonInfo::Syntax::AS_Microsoft: |
||
470 | return llvm::StringSwitch<int>(Name) |
||
471 | .Case("numthreads", 1) |
||
472 | .Case("shader", 1) |
||
473 | .Case("uuid", 1) |
||
474 | .Default(0); |
||
475 | case AttributeCommonInfo::Syntax::AS_Pragma: |
||
476 | return llvm::StringSwitch<int>(Name) |
||
477 | .Case("init_seg", 1) |
||
478 | .Case("loop", 1) |
||
479 | .Case("unroll", 1) |
||
480 | .Case("nounroll", 1) |
||
481 | .Case("unroll_and_jam", 1) |
||
482 | .Case("nounroll_and_jam", 1) |
||
483 | .Case("loop", 1) |
||
484 | .Case("unroll", 1) |
||
485 | .Case("nounroll", 1) |
||
486 | .Case("unroll_and_jam", 1) |
||
487 | .Case("nounroll_and_jam", 1) |
||
488 | .Case("loop", 1) |
||
489 | .Case("unroll", 1) |
||
490 | .Case("nounroll", 1) |
||
491 | .Case("unroll_and_jam", 1) |
||
492 | .Case("nounroll_and_jam", 1) |
||
493 | .Case("loop", 1) |
||
494 | .Case("unroll", 1) |
||
495 | .Case("nounroll", 1) |
||
496 | .Case("unroll_and_jam", 1) |
||
497 | .Case("nounroll_and_jam", 1) |
||
498 | .Case("loop", 1) |
||
499 | .Case("unroll", 1) |
||
500 | .Case("nounroll", 1) |
||
501 | .Case("unroll_and_jam", 1) |
||
502 | .Case("nounroll_and_jam", 1) |
||
503 | .Case("declare simd", 1) |
||
504 | .Case("declare target", 1) |
||
505 | .Case("declare variant", 1) |
||
506 | .Default(0); |
||
507 | case AttributeCommonInfo::Syntax::AS_HLSLSemantic: |
||
508 | return llvm::StringSwitch<int>(Name) |
||
509 | .Case("register", 1) |
||
510 | .Case("SV_DispatchThreadID", 1) |
||
511 | .Case("SV_GroupIndex", 1) |
||
512 | .Default(0); |
||
513 | case AttributeCommonInfo::Syntax::AS_CXX11: { |
||
514 | if (ScopeName == "") { |
||
515 | return llvm::StringSwitch<int>(Name) |
||
516 | .Case("noreturn", LangOpts.CPlusPlus11 ? 200809 : 0) |
||
517 | .Case("carries_dependency", LangOpts.CPlusPlus11 ? 200809 : 0) |
||
518 | .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0) |
||
519 | .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0) |
||
520 | .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
521 | .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
522 | .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
523 | .Case("likely", LangOpts.CPlusPlus11 ? 201803 : 0) |
||
524 | .Case("no_unique_address", true && ( Target.getCXXABI().isItaniumFamily() ) && LangOpts.CPlusPlus11 ? 201803 : 0) |
||
525 | .Case("unlikely", LangOpts.CPlusPlus11 ? 201803 : 0) |
||
526 | .Case("maybe_unused", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
527 | .Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
528 | .Case("nodiscard", LangOpts.CPlusPlus11 ? 201907 : 0) |
||
529 | .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0) |
||
530 | .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0) |
||
531 | .Default(0); |
||
532 | } else if (ScopeName == "clang") { |
||
533 | return llvm::StringSwitch<int>(Name) |
||
534 | .Case("aarch64_sve_pcs", LangOpts.CPlusPlus11 ? 1 : 0) |
||
535 | .Case("aarch64_vector_pcs", LangOpts.CPlusPlus11 ? 1 : 0) |
||
536 | .Case("amdgpu_flat_work_group_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
537 | .Case("amdgpu_kernel", LangOpts.CPlusPlus11 ? 1 : 0) |
||
538 | .Case("amdgpu_num_sgpr", LangOpts.CPlusPlus11 ? 1 : 0) |
||
539 | .Case("amdgpu_num_vgpr", LangOpts.CPlusPlus11 ? 1 : 0) |
||
540 | .Case("amdgpu_waves_per_eu", LangOpts.CPlusPlus11 ? 1 : 0) |
||
541 | .Case("acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
542 | .Case("acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
543 | .Case("acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
544 | .Case("acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
545 | .Case("acquire_handle", LangOpts.CPlusPlus11 ? 1 : 0) |
||
546 | .Case("address_space", LangOpts.CPlusPlus11 ? 1 : 0) |
||
547 | .Case("always_destroy", LangOpts.CPlusPlus11 ? 1 : 0) |
||
548 | .Case("always_inline", LangOpts.CPlusPlus11 ? 1 : 0) |
||
549 | .Case("annotate", LangOpts.CPlusPlus11 ? 1 : 0) |
||
550 | .Case("annotate_type", LangOpts.CPlusPlus11 ? 1 : 0) |
||
551 | .Case("objc_arc_weak_reference_unavailable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
552 | .Case("argument_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
553 | .Case("pointer_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
554 | .Case("argument_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
555 | .Case("pointer_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
556 | .Case("__clang_arm_builtin_alias", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb || T.getArch() == llvm::Triple::aarch64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
557 | .Case("__clang_arm_mve_strict_polymorphism", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
558 | .Case("assert_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
559 | .Case("assert_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
560 | .Case("assert_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
561 | .Case("assert_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
562 | .Case("assume", LangOpts.CPlusPlus11 ? 1 : 0) |
||
563 | .Case("availability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
564 | .Case("preserve_access_index", true && (T.getArch() == llvm::Triple::bpfel || T.getArch() == llvm::Triple::bpfeb) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
565 | .Case("btf_decl_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
566 | .Case("btf_type_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
567 | .Case("blocks", LangOpts.CPlusPlus11 ? 1 : 0) |
||
568 | .Case("builtin_alias", LangOpts.CPlusPlus11 ? 1 : 0) |
||
569 | .Case("cf_audited_transfer", LangOpts.CPlusPlus11 ? 1 : 0) |
||
570 | .Case("cf_consumed", LangOpts.CPlusPlus11 ? 1 : 0) |
||
571 | .Case("guard", true && (T.getOS() == llvm::Triple::Win32) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
572 | .Case("cfi_canonical_jump_table", LangOpts.CPlusPlus11 ? 1 : 0) |
||
573 | .Case("cf_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
574 | .Case("cf_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
575 | .Case("cf_unknown_transfer", LangOpts.CPlusPlus11 ? 1 : 0) |
||
576 | .Case("cpu_dispatch", LangOpts.CPlusPlus11 ? 1 : 0) |
||
577 | .Case("cpu_specific", LangOpts.CPlusPlus11 ? 1 : 0) |
||
578 | .Case("callable_when", LangOpts.CPlusPlus11 ? 1 : 0) |
||
579 | .Case("callback", LangOpts.CPlusPlus11 ? 1 : 0) |
||
580 | .Case("called_once", LangOpts.CPlusPlus11 ? 1 : 0) |
||
581 | .Case("capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
582 | .Case("shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
583 | .Case("capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
584 | .Case("shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
585 | .Case("require_constant_initialization", LangOpts.CPlusPlus11 ? 1 : 0) |
||
586 | .Case("consumable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
587 | .Case("consumable_auto_cast_state", LangOpts.CPlusPlus11 ? 1 : 0) |
||
588 | .Case("consumable_set_state_on_read", LangOpts.CPlusPlus11 ? 1 : 0) |
||
589 | .Case("convergent", LangOpts.CPlusPlus11 ? 1 : 0) |
||
590 | .Case("diagnose_as_builtin", LangOpts.CPlusPlus11 ? 1 : 0) |
||
591 | .Case("disable_sanitizer_instrumentation", LangOpts.CPlusPlus11 ? 1 : 0) |
||
592 | .Case("disable_tail_calls", LangOpts.CPlusPlus11 ? 1 : 0) |
||
593 | .Case("enforce_tcb", LangOpts.CPlusPlus11 ? 1 : 0) |
||
594 | .Case("enforce_tcb_leaf", LangOpts.CPlusPlus11 ? 1 : 0) |
||
595 | .Case("enum_extensibility", LangOpts.CPlusPlus11 ? 1 : 0) |
||
596 | .Case("exclude_from_explicit_instantiation", LangOpts.CPlusPlus11 ? 1 : 0) |
||
597 | .Case("external_source_symbol", LangOpts.CPlusPlus11 ? 1 : 0) |
||
598 | .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
599 | .Case("flag_enum", LangOpts.CPlusPlus11 ? 1 : 0) |
||
600 | .Case("guarded_var", LangOpts.CPlusPlus11 ? 1 : 0) |
||
601 | .Case("ibaction", LangOpts.CPlusPlus11 ? 1 : 0) |
||
602 | .Case("iboutlet", LangOpts.CPlusPlus11 ? 1 : 0) |
||
603 | .Case("iboutletcollection", LangOpts.CPlusPlus11 ? 1 : 0) |
||
604 | .Case("intel_ocl_bicc", LangOpts.CPlusPlus11 ? 1 : 0) |
||
605 | .Case("internal_linkage", LangOpts.CPlusPlus11 ? 1 : 0) |
||
606 | .Case("lto_visibility_public", LangOpts.CPlusPlus11 ? 1 : 0) |
||
607 | .Case("lifetimebound", LangOpts.CPlusPlus11 ? 1 : 0) |
||
608 | .Case("loader_uninitialized", LangOpts.CPlusPlus11 ? 1 : 0) |
||
609 | .Case("mig_server_routine", LangOpts.CPlusPlus11 ? 1 : 0) |
||
610 | .Case("matrix_type", LangOpts.CPlusPlus11 ? 1 : 0) |
||
611 | .Case("maybe_undef", LangOpts.CPlusPlus11 ? 1 : 0) |
||
612 | .Case("minsize", LangOpts.CPlusPlus11 ? 1 : 0) |
||
613 | .Case("min_vector_width", LangOpts.CPlusPlus11 ? 1 : 0) |
||
614 | .Case("musttail", LangOpts.CPlusPlus11 ? 1 : 0) |
||
615 | .Case("ns_consumed", LangOpts.CPlusPlus11 ? 1 : 0) |
||
616 | .Case("ns_consumes_self", LangOpts.CPlusPlus11 ? 1 : 0) |
||
617 | .Case("ns_returns_autoreleased", LangOpts.CPlusPlus11 ? 1 : 0) |
||
618 | .Case("ns_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
619 | .Case("ns_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
620 | .Case("neon_polyvector_type", LangOpts.CPlusPlus11 ? 1 : 0) |
||
621 | .Case("neon_vector_type", LangOpts.CPlusPlus11 ? 1 : 0) |
||
622 | .Case("no_builtin", LangOpts.CPlusPlus11 ? 1 : 0) |
||
623 | .Case("noderef", LangOpts.CPlusPlus11 ? 1 : 0) |
||
624 | .Case("no_destroy", LangOpts.CPlusPlus11 ? 1 : 0) |
||
625 | .Case("noduplicate", LangOpts.CPlusPlus11 ? 1 : 0) |
||
626 | .Case("noescape", LangOpts.CPlusPlus11 ? 1 : 0) |
||
627 | .Case("noinline", LangOpts.CPlusPlus11 ? 1 : 0) |
||
628 | .Case("nomerge", LangOpts.CPlusPlus11 ? 1 : 0) |
||
629 | .Case("no_sanitize", LangOpts.CPlusPlus11 ? 1 : 0) |
||
630 | .Case("no_sanitize_memory", LangOpts.CPlusPlus11 ? 1 : 0) |
||
631 | .Case("no_speculative_load_hardening", LangOpts.CPlusPlus11 ? 1 : 0) |
||
632 | .Case("no_stack_protector", LangOpts.CPlusPlus11 ? 1 : 0) |
||
633 | .Case("no_thread_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0) |
||
634 | .Case("nouwtable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
635 | .Case("not_tail_called", LangOpts.CPlusPlus11 ? 1 : 0) |
||
636 | .Case("os_consumed", LangOpts.CPlusPlus11 ? 1 : 0) |
||
637 | .Case("os_consumes_this", LangOpts.CPlusPlus11 ? 1 : 0) |
||
638 | .Case("os_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
639 | .Case("os_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
640 | .Case("os_returns_retained_on_non_zero", LangOpts.CPlusPlus11 ? 1 : 0) |
||
641 | .Case("os_returns_retained_on_zero", LangOpts.CPlusPlus11 ? 1 : 0) |
||
642 | .Case("objc_boxable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
643 | .Case("objc_bridge", LangOpts.CPlusPlus11 ? 1 : 0) |
||
644 | .Case("objc_bridge_mutable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
645 | .Case("objc_bridge_related", LangOpts.CPlusPlus11 ? 1 : 0) |
||
646 | .Case("objc_class_stub", LangOpts.CPlusPlus11 ? 1 : 0) |
||
647 | .Case("objc_designated_initializer", LangOpts.CPlusPlus11 ? 1 : 0) |
||
648 | .Case("objc_direct", LangOpts.CPlusPlus11 ? 1 : 0) |
||
649 | .Case("objc_direct_members", LangOpts.CPlusPlus11 ? 1 : 0) |
||
650 | .Case("objc_exception", LangOpts.CPlusPlus11 ? 1 : 0) |
||
651 | .Case("objc_protocol_requires_explicit_implementation", LangOpts.CPlusPlus11 ? 1 : 0) |
||
652 | .Case("objc_externally_retained", LangOpts.CPlusPlus11 ? 1 : 0) |
||
653 | .Case("objc_gc", LangOpts.CPlusPlus11 ? 1 : 0) |
||
654 | .Case("objc_independent_class", LangOpts.CPlusPlus11 ? 1 : 0) |
||
655 | .Case("objc_method_family", LangOpts.CPlusPlus11 ? 1 : 0) |
||
656 | .Case("NSObject", LangOpts.CPlusPlus11 ? 1 : 0) |
||
657 | .Case("objc_nonlazy_class", LangOpts.CPlusPlus11 ? 1 : 0) |
||
658 | .Case("objc_non_runtime_protocol", LangOpts.CPlusPlus11 ? 1 : 0) |
||
659 | .Case("objc_ownership", LangOpts.CPlusPlus11 ? 1 : 0) |
||
660 | .Case("objc_precise_lifetime", LangOpts.CPlusPlus11 ? 1 : 0) |
||
661 | .Case("objc_requires_property_definitions", LangOpts.CPlusPlus11 ? 1 : 0) |
||
662 | .Case("objc_requires_super", LangOpts.CPlusPlus11 ? 1 : 0) |
||
663 | .Case("objc_returns_inner_pointer", LangOpts.CPlusPlus11 ? 1 : 0) |
||
664 | .Case("objc_root_class", LangOpts.CPlusPlus11 ? 1 : 0) |
||
665 | .Case("objc_runtime_name", LangOpts.CPlusPlus11 ? 1 : 0) |
||
666 | .Case("objc_runtime_visible", LangOpts.CPlusPlus11 ? 1 : 0) |
||
667 | .Case("objc_subclassing_restricted", LangOpts.CPlusPlus11 ? 1 : 0) |
||
668 | .Case("opencl_constant", LangOpts.CPlusPlus11 ? 1 : 0) |
||
669 | .Case("opencl_generic", LangOpts.CPlusPlus11 ? 1 : 0) |
||
670 | .Case("opencl_global", LangOpts.CPlusPlus11 ? 1 : 0) |
||
671 | .Case("opencl_global_device", LangOpts.CPlusPlus11 ? 1 : 0) |
||
672 | .Case("opencl_global_host", LangOpts.CPlusPlus11 ? 1 : 0) |
||
673 | .Case("opencl_local", LangOpts.CPlusPlus11 ? 1 : 0) |
||
674 | .Case("opencl_private", LangOpts.CPlusPlus11 ? 1 : 0) |
||
675 | .Case("optnone", LangOpts.CPlusPlus11 ? 1 : 0) |
||
676 | .Case("overloadable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
677 | .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0) |
||
678 | .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0) |
||
679 | .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0) |
||
680 | .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0) |
||
681 | .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0) |
||
682 | .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0) |
||
683 | .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0) |
||
684 | .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0) |
||
685 | .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0) |
||
686 | .Case("param_typestate", LangOpts.CPlusPlus11 ? 1 : 0) |
||
687 | .Case("pascal", LangOpts.CPlusPlus11 ? 1 : 0) |
||
688 | .Case("pass_object_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
689 | .Case("pass_dynamic_object_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
690 | .Case("pass_object_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
691 | .Case("pass_dynamic_object_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
692 | .Case("preferred_name", LangOpts.CPlusPlus11 ? 1 : 0) |
||
693 | .Case("preserve_all", LangOpts.CPlusPlus11 ? 1 : 0) |
||
694 | .Case("preserve_most", LangOpts.CPlusPlus11 ? 1 : 0) |
||
695 | .Case("pt_guarded_var", LangOpts.CPlusPlus11 ? 1 : 0) |
||
696 | .Case("enforce_read_only_placement", LangOpts.CPlusPlus11 ? 1 : 0) |
||
697 | .Case("reinitializes", LangOpts.CPlusPlus11 ? 1 : 0) |
||
698 | .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
699 | .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
700 | .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
701 | .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0) |
||
702 | .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
703 | .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
704 | .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
705 | .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0) |
||
706 | .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
707 | .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
708 | .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
709 | .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0) |
||
710 | .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
711 | .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
712 | .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
713 | .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0) |
||
714 | .Case("release_handle", LangOpts.CPlusPlus11 ? 1 : 0) |
||
715 | .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
716 | .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
717 | .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
718 | .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
719 | .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
720 | .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
721 | .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
722 | .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
723 | .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
724 | .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
725 | .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
726 | .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
727 | .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
728 | .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
729 | .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
730 | .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0) |
||
731 | .Case("return_typestate", LangOpts.CPlusPlus11 ? 1 : 0) |
||
732 | .Case("sycl_kernel", LangOpts.CPlusPlus11 ? 1 : 0) |
||
733 | .Case("sycl_special_class", LangOpts.CPlusPlus11 ? 1 : 0) |
||
734 | .Case("scoped_lockable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
735 | .Case("set_typestate", LangOpts.CPlusPlus11 ? 1 : 0) |
||
736 | .Case("speculative_load_hardening", LangOpts.CPlusPlus11 ? 1 : 0) |
||
737 | .Case("standalone_debug", LangOpts.CPlusPlus11 ? 1 : 0) |
||
738 | .Case("swift_async", LangOpts.CPlusPlus11 ? 1 : 0) |
||
739 | .Case("swiftasynccall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
740 | .Case("swift_async_context", LangOpts.CPlusPlus11 ? 1 : 0) |
||
741 | .Case("swift_async_error", LangOpts.CPlusPlus11 ? 1 : 0) |
||
742 | .Case("swiftcall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
743 | .Case("swift_context", LangOpts.CPlusPlus11 ? 1 : 0) |
||
744 | .Case("swift_error_result", LangOpts.CPlusPlus11 ? 1 : 0) |
||
745 | .Case("swift_indirect_result", LangOpts.CPlusPlus11 ? 1 : 0) |
||
746 | .Case("test_typestate", LangOpts.CPlusPlus11 ? 1 : 0) |
||
747 | .Case("trivial_abi", LangOpts.CPlusPlus11 ? 1 : 0) |
||
748 | .Case("try_acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
749 | .Case("try_acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
750 | .Case("try_acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
751 | .Case("try_acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0) |
||
752 | .Case("type_tag_for_datatype", LangOpts.CPlusPlus11 ? 1 : 0) |
||
753 | .Case("type_visibility", LangOpts.CPlusPlus11 ? 1 : 0) |
||
754 | .Case("unavailable", LangOpts.CPlusPlus11 ? 1 : 0) |
||
755 | .Case("uninitialized", LangOpts.CPlusPlus11 ? 1 : 0) |
||
756 | .Case("use_handle", LangOpts.CPlusPlus11 ? 1 : 0) |
||
757 | .Case("using_if_exists", LangOpts.CPlusPlus11 ? 1 : 0) |
||
758 | .Case("vecreturn", LangOpts.CPlusPlus11 ? 1 : 0) |
||
759 | .Case("vectorcall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
760 | .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0) |
||
761 | .Case("weak_import", LangOpts.CPlusPlus11 ? 1 : 0) |
||
762 | .Case("export_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
763 | .Case("import_module", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
764 | .Case("import_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
765 | .Case("xray_always_instrument", LangOpts.CPlusPlus11 ? 1 : 0) |
||
766 | .Case("xray_never_instrument", LangOpts.CPlusPlus11 ? 1 : 0) |
||
767 | .Case("xray_always_instrument", LangOpts.CPlusPlus11 ? 1 : 0) |
||
768 | .Case("xray_never_instrument", LangOpts.CPlusPlus11 ? 1 : 0) |
||
769 | .Case("xray_log_args", LangOpts.CPlusPlus11 ? 1 : 0) |
||
770 | .Default(0); |
||
771 | } else if (ScopeName == "gnu") { |
||
772 | return llvm::StringSwitch<int>(Name) |
||
773 | .Case("interrupt", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
774 | .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
775 | .Case("signal", true && (T.getArch() == llvm::Triple::avr) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
776 | .Case("abi_tag", LangOpts.CPlusPlus11 ? 1 : 0) |
||
777 | .Case("alias", LangOpts.CPlusPlus11 ? 1 : 0) |
||
778 | .Case("aligned", LangOpts.CPlusPlus11 ? 1 : 0) |
||
779 | .Case("alloc_align", LangOpts.CPlusPlus11 ? 1 : 0) |
||
780 | .Case("alloc_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
781 | .Case("always_inline", LangOpts.CPlusPlus11 ? 1 : 0) |
||
782 | .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
783 | .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
784 | .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
785 | .Case("artificial", LangOpts.CPlusPlus11 ? 1 : 0) |
||
786 | .Case("assume_aligned", LangOpts.CPlusPlus11 ? 1 : 0) |
||
787 | .Case("cdecl", LangOpts.CPlusPlus11 ? 1 : 0) |
||
788 | .Case("cleanup", LangOpts.CPlusPlus11 ? 1 : 0) |
||
789 | .Case("cold", LangOpts.CPlusPlus11 ? 1 : 0) |
||
790 | .Case("common", LangOpts.CPlusPlus11 ? 1 : 0) |
||
791 | .Case("const", LangOpts.CPlusPlus11 ? 1 : 0) |
||
792 | .Case("__const", LangOpts.CPlusPlus11 ? 1 : 0) |
||
793 | .Case("const", LangOpts.CPlusPlus11 ? 1 : 0) |
||
794 | .Case("__const", LangOpts.CPlusPlus11 ? 1 : 0) |
||
795 | .Case("constructor", LangOpts.CPlusPlus11 ? 1 : 0) |
||
796 | .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
797 | .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
798 | .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0) |
||
799 | .Case("destructor", LangOpts.CPlusPlus11 ? 1 : 0) |
||
800 | .Case("error", LangOpts.CPlusPlus11 ? 1 : 0) |
||
801 | .Case("warning", LangOpts.CPlusPlus11 ? 1 : 0) |
||
802 | .Case("error", LangOpts.CPlusPlus11 ? 1 : 0) |
||
803 | .Case("warning", LangOpts.CPlusPlus11 ? 1 : 0) |
||
804 | .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
805 | .Case("fastcall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
806 | .Case("flatten", LangOpts.CPlusPlus11 ? 1 : 0) |
||
807 | .Case("format", LangOpts.CPlusPlus11 ? 1 : 0) |
||
808 | .Case("format_arg", LangOpts.CPlusPlus11 ? 1 : 0) |
||
809 | .Case("function_return", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
810 | .Case("gnu_inline", LangOpts.CPlusPlus11 ? 1 : 0) |
||
811 | .Case("hot", LangOpts.CPlusPlus11 ? 1 : 0) |
||
812 | .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
813 | .Case("init_priority", true && ( !Target.getTriple().isOSzOS() ) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
814 | .Case("leaf", LangOpts.CPlusPlus11 ? 1 : 0) |
||
815 | .Case("ms_abi", LangOpts.CPlusPlus11 ? 1 : 0) |
||
816 | .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
817 | .Case("ms_struct", LangOpts.CPlusPlus11 ? 1 : 0) |
||
818 | .Case("may_alias", LangOpts.CPlusPlus11 ? 1 : 0) |
||
819 | .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
820 | .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
821 | .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
822 | .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
823 | .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
824 | .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
825 | .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
826 | .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
827 | .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
828 | .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
829 | .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
830 | .Case("mode", LangOpts.CPlusPlus11 ? 1 : 0) |
||
831 | .Case("naked", LangOpts.CPlusPlus11 ? 1 : 0) |
||
832 | .Case("nocommon", LangOpts.CPlusPlus11 ? 1 : 0) |
||
833 | .Case("nodebug", LangOpts.CPlusPlus11 ? 1 : 0) |
||
834 | .Case("noinline", LangOpts.CPlusPlus11 ? 1 : 0) |
||
835 | .Case("no_instrument_function", LangOpts.CPlusPlus11 ? 1 : 0) |
||
836 | .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
837 | .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
838 | .Case("no_profile_instrument_function", LangOpts.CPlusPlus11 ? 1 : 0) |
||
839 | .Case("no_randomize_layout", LangOpts.CPlusPlus11 ? 1 : 0) |
||
840 | .Case("noreturn", LangOpts.CPlusPlus11 ? 1 : 0) |
||
841 | .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0) |
||
842 | .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0) |
||
843 | .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0) |
||
844 | .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0) |
||
845 | .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0) |
||
846 | .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0) |
||
847 | .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0) |
||
848 | .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0) |
||
849 | .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0) |
||
850 | .Case("no_split_stack", LangOpts.CPlusPlus11 ? 1 : 0) |
||
851 | .Case("nothrow", LangOpts.CPlusPlus11 ? 1 : 0) |
||
852 | .Case("nonnull", LangOpts.CPlusPlus11 ? 1 : 0) |
||
853 | .Case("packed", LangOpts.CPlusPlus11 ? 1 : 0) |
||
854 | .Case("patchable_function_entry", true && (T.getArch() == llvm::Triple::aarch64 || T.getArch() == llvm::Triple::aarch64_be || T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64 || T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
855 | .Case("pcs", LangOpts.CPlusPlus11 ? 1 : 0) |
||
856 | .Case("pure", LangOpts.CPlusPlus11 ? 1 : 0) |
||
857 | .Case("interrupt", true && (T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
858 | .Case("randomize_layout", LangOpts.CPlusPlus11 ? 1 : 0) |
||
859 | .Case("regcall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
860 | .Case("regparm", LangOpts.CPlusPlus11 ? 1 : 0) |
||
861 | .Case("malloc", LangOpts.CPlusPlus11 ? 1 : 0) |
||
862 | .Case("retain", LangOpts.CPlusPlus11 ? 1 : 0) |
||
863 | .Case("returns_nonnull", LangOpts.CPlusPlus11 ? 1 : 0) |
||
864 | .Case("returns_twice", LangOpts.CPlusPlus11 ? 1 : 0) |
||
865 | .Case("section", LangOpts.CPlusPlus11 ? 1 : 0) |
||
866 | .Case("selectany", LangOpts.CPlusPlus11 ? 1 : 0) |
||
867 | .Case("sentinel", LangOpts.CPlusPlus11 ? 1 : 0) |
||
868 | .Case("stdcall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
869 | .Case("sysv_abi", LangOpts.CPlusPlus11 ? 1 : 0) |
||
870 | .Case("tls_model", LangOpts.CPlusPlus11 ? 1 : 0) |
||
871 | .Case("target", LangOpts.CPlusPlus11 ? 1 : 0) |
||
872 | .Case("target_clones", LangOpts.CPlusPlus11 ? 1 : 0) |
||
873 | .Case("target_version", LangOpts.CPlusPlus11 ? 1 : 0) |
||
874 | .Case("thiscall", LangOpts.CPlusPlus11 ? 1 : 0) |
||
875 | .Case("transparent_union", LangOpts.CPlusPlus11 ? 1 : 0) |
||
876 | .Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0) |
||
877 | .Case("used", LangOpts.CPlusPlus11 ? 1 : 0) |
||
878 | .Case("vector_size", LangOpts.CPlusPlus11 ? 1 : 0) |
||
879 | .Case("visibility", LangOpts.CPlusPlus11 ? 1 : 0) |
||
880 | .Case("warn_unused", LangOpts.CPlusPlus11 ? 1 : 0) |
||
881 | .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0) |
||
882 | .Case("weak", LangOpts.CPlusPlus11 ? 1 : 0) |
||
883 | .Case("weakref", LangOpts.CPlusPlus11 ? 1 : 0) |
||
884 | .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0) |
||
885 | .Case("zero_call_used_regs", LangOpts.CPlusPlus11 ? 1 : 0) |
||
886 | .Default(0); |
||
887 | } else if (ScopeName == "gsl") { |
||
888 | return llvm::StringSwitch<int>(Name) |
||
889 | .Case("Owner", LangOpts.CPlusPlus11 ? 1 : 0) |
||
890 | .Case("Pointer", LangOpts.CPlusPlus11 ? 1 : 0) |
||
891 | .Case("suppress", LangOpts.CPlusPlus11 ? 1 : 0) |
||
892 | .Default(0); |
||
893 | } |
||
894 | } break; |
||
895 | case AttributeCommonInfo::Syntax::AS_C2x: { |
||
896 | if (ScopeName == "") { |
||
897 | return llvm::StringSwitch<int>(Name) |
||
898 | .Case("noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0) |
||
899 | .Case("_Noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0) |
||
900 | .Case("noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0) |
||
901 | .Case("_Noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0) |
||
902 | .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 201904 : 0) |
||
903 | .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 201904 : 0) |
||
904 | .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 201910 : 0) |
||
905 | .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 201910 : 0) |
||
906 | .Case("unused", LangOpts.DoubleSquareBracketAttributes ? 202106 : 0) |
||
907 | .Case("maybe_unused", LangOpts.DoubleSquareBracketAttributes ? 202106 : 0) |
||
908 | .Case("nodiscard", LangOpts.DoubleSquareBracketAttributes ? 202003 : 0) |
||
909 | .Case("warn_unused_result", LangOpts.DoubleSquareBracketAttributes ? 202003 : 0) |
||
910 | .Default(0); |
||
911 | } else if (ScopeName == "clang") { |
||
912 | return llvm::StringSwitch<int>(Name) |
||
913 | .Case("aarch64_sve_pcs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
914 | .Case("aarch64_vector_pcs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
915 | .Case("amdgpu_kernel", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
916 | .Case("acquire_handle", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
917 | .Case("address_space", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
918 | .Case("always_inline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
919 | .Case("annotate", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
920 | .Case("annotate_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
921 | .Case("objc_arc_weak_reference_unavailable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
922 | .Case("argument_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
923 | .Case("pointer_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
924 | .Case("argument_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
925 | .Case("pointer_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
926 | .Case("__clang_arm_builtin_alias", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb || T.getArch() == llvm::Triple::aarch64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
927 | .Case("__clang_arm_mve_strict_polymorphism", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
928 | .Case("assume", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
929 | .Case("availability", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
930 | .Case("preserve_access_index", true && (T.getArch() == llvm::Triple::bpfel || T.getArch() == llvm::Triple::bpfeb) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
931 | .Case("btf_decl_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
932 | .Case("btf_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
933 | .Case("blocks", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
934 | .Case("builtin_alias", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
935 | .Case("cf_audited_transfer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
936 | .Case("cf_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
937 | .Case("guard", true && (T.getOS() == llvm::Triple::Win32) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
938 | .Case("cfi_canonical_jump_table", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
939 | .Case("cf_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
940 | .Case("cf_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
941 | .Case("cf_unknown_transfer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
942 | .Case("cpu_dispatch", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
943 | .Case("cpu_specific", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
944 | .Case("callback", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
945 | .Case("called_once", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
946 | .Case("convergent", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
947 | .Case("diagnose_as_builtin", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
948 | .Case("disable_sanitizer_instrumentation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
949 | .Case("disable_tail_calls", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
950 | .Case("enforce_tcb", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
951 | .Case("enforce_tcb_leaf", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
952 | .Case("enum_extensibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
953 | .Case("exclude_from_explicit_instantiation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
954 | .Case("external_source_symbol", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
955 | .Case("flag_enum", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
956 | .Case("ibaction", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
957 | .Case("iboutlet", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
958 | .Case("iboutletcollection", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
959 | .Case("internal_linkage", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
960 | .Case("lto_visibility_public", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
961 | .Case("likely", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
962 | .Case("loader_uninitialized", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
963 | .Case("mig_server_routine", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
964 | .Case("matrix_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
965 | .Case("maybe_undef", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
966 | .Case("minsize", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
967 | .Case("min_vector_width", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
968 | .Case("musttail", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
969 | .Case("ns_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
970 | .Case("ns_consumes_self", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
971 | .Case("ns_returns_autoreleased", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
972 | .Case("ns_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
973 | .Case("ns_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
974 | .Case("neon_polyvector_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
975 | .Case("neon_vector_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
976 | .Case("no_builtin", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
977 | .Case("noderef", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
978 | .Case("noduplicate", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
979 | .Case("noescape", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
980 | .Case("noinline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
981 | .Case("nomerge", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
982 | .Case("no_sanitize", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
983 | .Case("no_sanitize_memory", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
984 | .Case("no_speculative_load_hardening", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
985 | .Case("no_stack_protector", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
986 | .Case("no_thread_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
987 | .Case("nouwtable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
988 | .Case("not_tail_called", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
989 | .Case("os_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
990 | .Case("os_consumes_this", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
991 | .Case("os_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
992 | .Case("os_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
993 | .Case("os_returns_retained_on_non_zero", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
994 | .Case("os_returns_retained_on_zero", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
995 | .Case("objc_boxable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
996 | .Case("objc_bridge", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
997 | .Case("objc_bridge_mutable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
998 | .Case("objc_bridge_related", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
999 | .Case("objc_class_stub", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1000 | .Case("objc_designated_initializer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1001 | .Case("objc_direct", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1002 | .Case("objc_direct_members", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1003 | .Case("objc_exception", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1004 | .Case("objc_protocol_requires_explicit_implementation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1005 | .Case("objc_externally_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1006 | .Case("objc_gc", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1007 | .Case("objc_independent_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1008 | .Case("objc_method_family", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1009 | .Case("NSObject", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1010 | .Case("objc_nonlazy_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1011 | .Case("objc_non_runtime_protocol", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1012 | .Case("objc_ownership", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1013 | .Case("objc_precise_lifetime", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1014 | .Case("objc_requires_property_definitions", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1015 | .Case("objc_requires_super", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1016 | .Case("objc_returns_inner_pointer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1017 | .Case("objc_root_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1018 | .Case("objc_runtime_name", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1019 | .Case("objc_runtime_visible", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1020 | .Case("objc_subclassing_restricted", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1021 | .Case("opencl_constant", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1022 | .Case("opencl_generic", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1023 | .Case("opencl_global", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1024 | .Case("opencl_global_device", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1025 | .Case("opencl_global_host", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1026 | .Case("opencl_local", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1027 | .Case("opencl_private", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1028 | .Case("optnone", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1029 | .Case("overloadable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1030 | .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1031 | .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1032 | .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1033 | .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1034 | .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1035 | .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1036 | .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1037 | .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1038 | .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1039 | .Case("pascal", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1040 | .Case("pass_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1041 | .Case("pass_dynamic_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1042 | .Case("pass_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1043 | .Case("pass_dynamic_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1044 | .Case("preserve_all", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1045 | .Case("preserve_most", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1046 | .Case("enforce_read_only_placement", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1047 | .Case("release_handle", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1048 | .Case("sycl_kernel", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1049 | .Case("sycl_special_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1050 | .Case("speculative_load_hardening", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1051 | .Case("swift_async", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1052 | .Case("swiftasynccall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1053 | .Case("swift_async_context", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1054 | .Case("swift_async_error", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1055 | .Case("swiftcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1056 | .Case("swift_context", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1057 | .Case("swift_error_result", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1058 | .Case("swift_indirect_result", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1059 | .Case("type_tag_for_datatype", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1060 | .Case("type_visibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1061 | .Case("unavailable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1062 | .Case("unlikely", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1063 | .Case("use_handle", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1064 | .Case("vectorcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1065 | .Case("weak_import", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1066 | .Case("export_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1067 | .Case("import_module", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1068 | .Case("import_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1069 | .Case("xray_always_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1070 | .Case("xray_never_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1071 | .Case("xray_always_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1072 | .Case("xray_never_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1073 | .Case("xray_log_args", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1074 | .Default(0); |
||
1075 | } else if (ScopeName == "gnu") { |
||
1076 | return llvm::StringSwitch<int>(Name) |
||
1077 | .Case("interrupt", true && (T.getArch() == llvm::Triple::arm || T.getArch() == llvm::Triple::thumb || T.getArch() == llvm::Triple::armeb || T.getArch() == llvm::Triple::thumbeb) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1078 | .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1079 | .Case("signal", true && (T.getArch() == llvm::Triple::avr) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1080 | .Case("alias", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1081 | .Case("aligned", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1082 | .Case("alloc_align", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1083 | .Case("alloc_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1084 | .Case("always_inline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1085 | .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1086 | .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1087 | .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1088 | .Case("artificial", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1089 | .Case("assume_aligned", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1090 | .Case("cdecl", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1091 | .Case("cleanup", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1092 | .Case("cold", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1093 | .Case("common", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1094 | .Case("const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1095 | .Case("__const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1096 | .Case("const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1097 | .Case("__const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1098 | .Case("constructor", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1099 | .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1100 | .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1101 | .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 201904 : 0) |
||
1102 | .Case("destructor", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1103 | .Case("error", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1104 | .Case("warning", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1105 | .Case("error", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1106 | .Case("warning", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1107 | .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 201910 : 0) |
||
1108 | .Case("fastcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1109 | .Case("flatten", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1110 | .Case("format", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1111 | .Case("format_arg", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1112 | .Case("function_return", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1113 | .Case("gnu_inline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1114 | .Case("hot", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1115 | .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1116 | .Case("leaf", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1117 | .Case("ms_abi", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1118 | .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1119 | .Case("ms_struct", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1120 | .Case("may_alias", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1121 | .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1122 | .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1123 | .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1124 | .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1125 | .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1126 | .Case("long_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1127 | .Case("far", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1128 | .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1129 | .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1130 | .Case("short_call", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1131 | .Case("near", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel || T.getArch() == llvm::Triple::mips64 || T.getArch() == llvm::Triple::mips64el) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1132 | .Case("mode", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1133 | .Case("naked", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1134 | .Case("nocommon", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1135 | .Case("nodebug", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1136 | .Case("noinline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1137 | .Case("no_instrument_function", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1138 | .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1139 | .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1140 | .Case("no_profile_instrument_function", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1141 | .Case("no_randomize_layout", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1142 | .Case("noreturn", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1143 | .Case("no_address_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1144 | .Case("no_sanitize_address", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1145 | .Case("no_sanitize_thread", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1146 | .Case("no_address_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1147 | .Case("no_sanitize_address", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1148 | .Case("no_sanitize_thread", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1149 | .Case("no_address_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1150 | .Case("no_sanitize_address", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1151 | .Case("no_sanitize_thread", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1152 | .Case("no_split_stack", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1153 | .Case("nothrow", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1154 | .Case("nonnull", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1155 | .Case("packed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1156 | .Case("patchable_function_entry", true && (T.getArch() == llvm::Triple::aarch64 || T.getArch() == llvm::Triple::aarch64_be || T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64 || T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1157 | .Case("pcs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1158 | .Case("pure", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1159 | .Case("interrupt", true && (T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1160 | .Case("randomize_layout", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1161 | .Case("regcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1162 | .Case("regparm", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1163 | .Case("malloc", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1164 | .Case("retain", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1165 | .Case("returns_nonnull", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1166 | .Case("returns_twice", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1167 | .Case("section", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1168 | .Case("selectany", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1169 | .Case("sentinel", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1170 | .Case("stdcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1171 | .Case("sysv_abi", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1172 | .Case("tls_model", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1173 | .Case("target", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1174 | .Case("target_clones", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1175 | .Case("target_version", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1176 | .Case("thiscall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1177 | .Case("transparent_union", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1178 | .Case("unused", LangOpts.DoubleSquareBracketAttributes ? 202106 : 0) |
||
1179 | .Case("used", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1180 | .Case("vector_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1181 | .Case("visibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1182 | .Case("warn_unused", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1183 | .Case("warn_unused_result", LangOpts.DoubleSquareBracketAttributes ? 202003 : 0) |
||
1184 | .Case("weak", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1185 | .Case("weakref", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1186 | .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1187 | .Case("zero_call_used_regs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0) |
||
1188 | .Default(0); |
||
1189 | } |
||
1190 | } break; |
||
1191 | case AttributeCommonInfo::Syntax::AS_Keyword: |
||
1192 | case AttributeCommonInfo::Syntax::AS_ContextSensitiveKeyword: |
||
1193 | llvm_unreachable("hasAttribute not supported for keyword"); |
||
1194 | return 0; |
||
1195 | } |