/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* Code to implement the __has_attribute logic                                *|
|*                                                                            *|
|* Automatically generated file, do not edit!                                 *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

const llvm::Triple &T = Target.getTriple();
switch (Syntax) {
case AttributeCommonInfo::Syntax::AS_GNU:
  return llvm::StringSwitch<int>(Name)
    .Case("aarch64_sve_pcs", 1)
    .Case("aarch64_vector_pcs", 1)
    .Case("amdgpu_flat_work_group_size", 1)
    .Case("amdgpu_kernel", 1)
    .Case("amdgpu_num_sgpr", 1)
    .Case("amdgpu_num_vgpr", 1)
    .Case("amdgpu_waves_per_eu", 1)
    .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)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) ? 1 : 0)
    .Case("signal", true && (T.getArch() == llvm::Triple::avr) ? 1 : 0)
    .Case("abi_tag", 1)
    .Case("acquire_capability", 1)
    .Case("acquire_shared_capability", 1)
    .Case("exclusive_lock_function", 1)
    .Case("shared_lock_function", 1)
    .Case("acquire_capability", 1)
    .Case("acquire_shared_capability", 1)
    .Case("exclusive_lock_function", 1)
    .Case("shared_lock_function", 1)
    .Case("acquire_capability", 1)
    .Case("acquire_shared_capability", 1)
    .Case("exclusive_lock_function", 1)
    .Case("shared_lock_function", 1)
    .Case("acquire_capability", 1)
    .Case("acquire_shared_capability", 1)
    .Case("exclusive_lock_function", 1)
    .Case("shared_lock_function", 1)
    .Case("acquire_handle", 1)
    .Case("acquired_after", 1)
    .Case("acquired_before", 1)
    .Case("address_space", 1)
    .Case("alias", 1)
    .Case("align_value", 1)
    .Case("aligned", 1)
    .Case("alloc_align", 1)
    .Case("alloc_size", 1)
    .Case("always_destroy", 1)
    .Case("always_inline", 1)
    .Case("analyzer_noreturn", 1)
    .Case("annotate", 1)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
    .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
    .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
    .Case("objc_arc_weak_reference_unavailable", 1)
    .Case("argument_with_type_tag", 1)
    .Case("pointer_with_type_tag", 1)
    .Case("argument_with_type_tag", 1)
    .Case("pointer_with_type_tag", 1)
    .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)
    .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)
    .Case("arm_sve_vector_bits", 1)
    .Case("artificial", 1)
    .Case("assert_capability", 1)
    .Case("assert_shared_capability", 1)
    .Case("assert_capability", 1)
    .Case("assert_shared_capability", 1)
    .Case("assert_exclusive_lock", 1)
    .Case("assert_shared_lock", 1)
    .Case("assume_aligned", 1)
    .Case("assume", 1)
    .Case("availability", 1)
    .Case("preserve_access_index", true && (T.getArch() == llvm::Triple::bpfel || T.getArch() == llvm::Triple::bpfeb) ? 1 : 0)
    .Case("btf_decl_tag", 1)
    .Case("btf_type_tag", 1)
    .Case("blocks", 1)
    .Case("bounded", 1)
    .Case("clang_builtin_alias", 1)
    .Case("cdecl", 1)
    .Case("cf_audited_transfer", 1)
    .Case("cf_consumed", 1)
    .Case("guard", true && (T.getOS() == llvm::Triple::Win32) ? 1 : 0)
    .Case("cfi_canonical_jump_table", 1)
    .Case("cf_returns_not_retained", 1)
    .Case("cf_returns_retained", 1)
    .Case("cf_unknown_transfer", 1)
    .Case("cpu_dispatch", 1)
    .Case("cpu_specific", 1)
    .Case("constant", 1)
    .Case("cudart_builtin", 1)
    .Case("device", 1)
    .Case("device_builtin", 1)
    .Case("device_builtin_surface_type", 1)
    .Case("device_builtin_texture_type", 1)
    .Case("global", 1)
    .Case("host", 1)
    .Case("launch_bounds", 1)
    .Case("shared", 1)
    .Case("callable_when", 1)
    .Case("callback", 1)
    .Case("called_once", 1)
    .Case("capability", 1)
    .Case("shared_capability", 1)
    .Case("capability", 1)
    .Case("shared_capability", 1)
    .Case("carries_dependency", 1)
    .Case("cleanup", 1)
    .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)
    .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)
    .Case("cold", 1)
    .Case("common", 1)
    .Case("const", 1)
    .Case("__const", 1)
    .Case("const", 1)
    .Case("__const", 1)
    .Case("require_constant_initialization", 1)
    .Case("constructor", 1)
    .Case("consumable", 1)
    .Case("consumable_auto_cast_state", 1)
    .Case("consumable_set_state_on_read", 1)
    .Case("convergent", 1)
    .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0)
    .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0)
    .Case("deprecated", 1)
    .Case("destructor", 1)
    .Case("diagnose_as_builtin", 1)
    .Case("diagnose_if", 1)
    .Case("disable_sanitizer_instrumentation", 1)
    .Case("disable_tail_calls", 1)
    .Case("enable_if", 1)
    .Case("enforce_tcb", 1)
    .Case("enforce_tcb_leaf", 1)
    .Case("enum_extensibility", 1)
    .Case("error", 1)
    .Case("warning", 1)
    .Case("error", 1)
    .Case("warning", 1)
    .Case("exclude_from_explicit_instantiation", 1)
    .Case("exclusive_trylock_function", 1)
    .Case("ext_vector_type", 1)
    .Case("external_source_symbol", 1)
    .Case("fallthrough", 1)
    .Case("fastcall", 1)
    .Case("flag_enum", 1)
    .Case("flatten", 1)
    .Case("format", 1)
    .Case("format_arg", 1)
    .Case("function_return", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
    .Case("gnu_inline", 1)
    .Case("guarded_by", 1)
    .Case("guarded_var", 1)
    .Case("managed", 1)
    .Case("hot", 1)
    .Case("ibaction", 1)
    .Case("iboutlet", 1)
    .Case("iboutletcollection", 1)
    .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) ? 1 : 0)
    .Case("init_priority", true && ( !Target.getTriple().isOSzOS() ) ? 1 : 0)
    .Case("intel_ocl_bicc", 1)
    .Case("internal_linkage", 1)
    .Case("lto_visibility_public", 1)
    .Case("leaf", 1)
    .Case("lifetimebound", 1)
    .Case("loader_uninitialized", 1)
    .Case("lock_returned", 1)
    .Case("lockable", 1)
    .Case("locks_excluded", 1)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::m68k) ? 1 : 0)
    .Case("mig_server_routine", 1)
    .Case("ms_abi", 1)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) ? 1 : 0)
    .Case("ms_struct", 1)
    .Case("matrix_type", 1)
    .Case("may_alias", 1)
    .Case("maybe_undef", 1)
    .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
    .Case("minsize", 1)
    .Case("min_vector_width", 1)
    .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .Case("mode", 1)
    .Case("musttail", 1)
    .Case("ns_consumed", 1)
    .Case("ns_consumes_self", 1)
    .Case("ns_error_domain", 1)
    .Case("ns_returns_autoreleased", 1)
    .Case("ns_returns_not_retained", 1)
    .Case("ns_returns_retained", 1)
    .Case("naked", 1)
    .Case("neon_polyvector_type", 1)
    .Case("neon_vector_type", 1)
    .Case("no_builtin", 1)
    .Case("nocommon", 1)
    .Case("nodebug", 1)
    .Case("noderef", 1)
    .Case("no_destroy", 1)
    .Case("noduplicate", 1)
    .Case("noescape", 1)
    .Case("noinline", 1)
    .Case("no_instrument_function", 1)
    .Case("nomerge", 1)
    .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
    .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) ? 1 : 0)
    .Case("no_profile_instrument_function", 1)
    .Case("no_randomize_layout", 1)
    .Case("noreturn", 1)
    .Case("no_sanitize", 1)
    .Case("no_address_safety_analysis", 1)
    .Case("no_sanitize_address", 1)
    .Case("no_sanitize_thread", 1)
    .Case("no_sanitize_memory", 1)
    .Case("no_address_safety_analysis", 1)
    .Case("no_sanitize_address", 1)
    .Case("no_sanitize_thread", 1)
    .Case("no_sanitize_memory", 1)
    .Case("no_address_safety_analysis", 1)
    .Case("no_sanitize_address", 1)
    .Case("no_sanitize_thread", 1)
    .Case("no_sanitize_memory", 1)
    .Case("no_address_safety_analysis", 1)
    .Case("no_sanitize_address", 1)
    .Case("no_sanitize_thread", 1)
    .Case("no_sanitize_memory", 1)
    .Case("no_speculative_load_hardening", 1)
    .Case("no_split_stack", 1)
    .Case("no_stack_protector", 1)
    .Case("no_thread_safety_analysis", 1)
    .Case("nothrow", 1)
    .Case("nouwtable", 1)
    .Case("nonnull", 1)
    .Case("not_tail_called", 1)
    .Case("nv_weak", 1)
    .Case("os_consumed", 1)
    .Case("os_consumes_this", 1)
    .Case("os_returns_not_retained", 1)
    .Case("os_returns_retained", 1)
    .Case("os_returns_retained_on_non_zero", 1)
    .Case("os_returns_retained_on_zero", 1)
    .Case("objc_boxable", 1)
    .Case("objc_bridge", 1)
    .Case("objc_bridge_mutable", 1)
    .Case("objc_bridge_related", 1)
    .Case("objc_class_stub", 1)
    .Case("objc_designated_initializer", 1)
    .Case("objc_direct", 1)
    .Case("objc_direct_members", 1)
    .Case("objc_exception", 1)
    .Case("objc_protocol_requires_explicit_implementation", 1)
    .Case("objc_externally_retained", 1)
    .Case("objc_gc", 1)
    .Case("objc_independent_class", 1)
    .Case("objc_method_family", 1)
    .Case("NSObject", 1)
    .Case("objc_nonlazy_class", 1)
    .Case("objc_non_runtime_protocol", 1)
    .Case("objc_ownership", 1)
    .Case("objc_precise_lifetime", 1)
    .Case("objc_requires_property_definitions", 1)
    .Case("objc_requires_super", 1)
    .Case("objc_returns_inner_pointer", 1)
    .Case("objc_root_class", 1)
    .Case("objc_runtime_name", 1)
    .Case("objc_runtime_visible", 1)
    .Case("objc_subclassing_restricted", 1)
    .Case("opencl_constant", 1)
    .Case("opencl_generic", 1)
    .Case("opencl_global", 1)
    .Case("opencl_global_device", 1)
    .Case("opencl_global_host", 1)
    .Case("intel_reqd_sub_group_size", 1)
    .Case("opencl_local", 1)
    .Case("nosvm", 1)
    .Case("opencl_private", 1)
    .Case("opencl_unroll_hint", 1)
    .Case("optnone", 1)
    .Case("overloadable", 1)
    .Case("ownership_holds", 1)
    .Case("ownership_returns", 1)
    .Case("ownership_takes", 1)
    .Case("ownership_holds", 1)
    .Case("ownership_returns", 1)
    .Case("ownership_takes", 1)
    .Case("ownership_holds", 1)
    .Case("ownership_returns", 1)
    .Case("ownership_takes", 1)
    .Case("packed", 1)
    .Case("param_typestate", 1)
    .Case("pascal", 1)
    .Case("pass_object_size", 1)
    .Case("pass_dynamic_object_size", 1)
    .Case("pass_object_size", 1)
    .Case("pass_dynamic_object_size", 1)
    .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)
    .Case("pcs", 1)
    .Case("preferred_name", 1)
    .Case("preserve_all", 1)
    .Case("preserve_most", 1)
    .Case("pt_guarded_by", 1)
    .Case("pt_guarded_var", 1)
    .Case("pure", 1)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64) ? 1 : 0)
    .Case("randomize_layout", 1)
    .Case("enforce_read_only_placement", 1)
    .Case("regcall", 1)
    .Case("regparm", 1)
    .Case("reinitializes", 1)
    .Case("release_capability", 1)
    .Case("release_shared_capability", 1)
    .Case("release_generic_capability", 1)
    .Case("unlock_function", 1)
    .Case("release_capability", 1)
    .Case("release_shared_capability", 1)
    .Case("release_generic_capability", 1)
    .Case("unlock_function", 1)
    .Case("release_capability", 1)
    .Case("release_shared_capability", 1)
    .Case("release_generic_capability", 1)
    .Case("unlock_function", 1)
    .Case("release_capability", 1)
    .Case("release_shared_capability", 1)
    .Case("release_generic_capability", 1)
    .Case("unlock_function", 1)
    .Case("release_handle", 1)
    .Case("kernel", 1)
    .Case("reqd_work_group_size", 1)
    .Case("requires_capability", 1)
    .Case("exclusive_locks_required", 1)
    .Case("requires_shared_capability", 1)
    .Case("shared_locks_required", 1)
    .Case("requires_capability", 1)
    .Case("exclusive_locks_required", 1)
    .Case("requires_shared_capability", 1)
    .Case("shared_locks_required", 1)
    .Case("requires_capability", 1)
    .Case("exclusive_locks_required", 1)
    .Case("requires_shared_capability", 1)
    .Case("shared_locks_required", 1)
    .Case("requires_capability", 1)
    .Case("exclusive_locks_required", 1)
    .Case("requires_shared_capability", 1)
    .Case("shared_locks_required", 1)
    .Case("malloc", 1)
    .Case("retain", 1)
    .Case("return_typestate", 1)
    .Case("returns_nonnull", 1)
    .Case("returns_twice", 1)
    .Case("sycl_kernel", 1)
    .Case("sycl_special_class", 1)
    .Case("scoped_lockable", 1)
    .Case("section", 1)
    .Case("selectany", 1)
    .Case("sentinel", 1)
    .Case("set_typestate", 1)
    .Case("shared_trylock_function", 1)
    .Case("speculative_load_hardening", 1)
    .Case("standalone_debug", 1)
    .Case("stdcall", 1)
    .Case("swift_async", 1)
    .Case("swiftasynccall", 1)
    .Case("swift_async_context", 1)
    .Case("swift_async_error", 1)
    .Case("swift_async_name", 1)
    .Case("swift_attr", 1)
    .Case("swift_bridge", 1)
    .Case("swift_bridged_typedef", 1)
    .Case("swiftcall", 1)
    .Case("swift_context", 1)
    .Case("swift_error", 1)
    .Case("swift_error_result", 1)
    .Case("swift_indirect_result", 1)
    .Case("swift_name", 1)
    .Case("swift_newtype", 1)
    .Case("swift_wrapper", 1)
    .Case("swift_newtype", 1)
    .Case("swift_wrapper", 1)
    .Case("swift_objc_members", 1)
    .Case("swift_private", 1)
    .Case("sysv_abi", 1)
    .Case("tls_model", 1)
    .Case("target", 1)
    .Case("target_clones", 1)
    .Case("target_version", 1)
    .Case("test_typestate", 1)
    .Case("thiscall", 1)
    .Case("transparent_union", 1)
    .Case("trivial_abi", 1)
    .Case("try_acquire_capability", 1)
    .Case("try_acquire_shared_capability", 1)
    .Case("try_acquire_capability", 1)
    .Case("try_acquire_shared_capability", 1)
    .Case("type_tag_for_datatype", 1)
    .Case("type_visibility", 1)
    .Case("unavailable", 1)
    .Case("uninitialized", 1)
    .Case("unused", 1)
    .Case("use_handle", 1)
    .Case("used", 1)
    .Case("using_if_exists", 1)
    .Case("vecreturn", 1)
    .Case("vec_type_hint", 1)
    .Case("vectorcall", 1)
    .Case("vector_size", 1)
    .Case("visibility", 1)
    .Case("warn_unused", 1)
    .Case("warn_unused_result", 1)
    .Case("weak", 1)
    .Case("weak_import", 1)
    .Case("weakref", 1)
    .Case("export_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) ? 1 : 0)
    .Case("import_module", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) ? 1 : 0)
    .Case("import_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) ? 1 : 0)
    .Case("work_group_size_hint", 1)
    .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) ? 1 : 0)
    .Case("xray_always_instrument", 1)
    .Case("xray_never_instrument", 1)
    .Case("xray_always_instrument", 1)
    .Case("xray_never_instrument", 1)
    .Case("xray_log_args", 1)
    .Case("zero_call_used_regs", 1)
    .Default(0);
case AttributeCommonInfo::Syntax::AS_Declspec:
  return llvm::StringSwitch<int>(Name)
    .Case("align", 1)
    .Case("guard", true && (T.getOS() == llvm::Triple::Win32) ? 1 : 0)
    .Case("cpu_dispatch", 1)
    .Case("cpu_specific", 1)
    .Case("__constant__", 1)
    .Case("__cudart_builtin__", 1)
    .Case("__device__", 1)
    .Case("__device_builtin__", 1)
    .Case("__device_builtin_surface_type__", 1)
    .Case("__device_builtin_texture_type__", 1)
    .Case("__global__", 1)
    .Case("__host__", 1)
    .Case("__launch_bounds__", 1)
    .Case("__shared__", 1)
    .Case("code_seg", 1)
    .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0)
    .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) ? 1 : 0)
    .Case("deprecated", 1)
    .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)
    .Case("__managed__", 1)
    .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)
    .Case("allocator", 1)
    .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)
    .Case("naked", 1)
    .Case("noalias", 1)
    .Case("noinline", 1)
    .Case("noreturn", 1)
    .Case("safebuffers", 1)
    .Case("nothrow", 1)
    .Case("restrict", 1)
    .Case("allocate", 1)
    .Case("selectany", 1)
    .Case("strict_gs_check", 1)
    .Case("thread", 1)
    .Case("uuid", 1)
    .Case("property", 1)
    .Default(0);
case AttributeCommonInfo::Syntax::AS_Microsoft:
  return llvm::StringSwitch<int>(Name)
    .Case("numthreads", 1)
    .Case("shader", 1)
    .Case("uuid", 1)
    .Default(0);
case AttributeCommonInfo::Syntax::AS_Pragma:
  return llvm::StringSwitch<int>(Name)
    .Case("init_seg", 1)
    .Case("loop", 1)
    .Case("unroll", 1)
    .Case("nounroll", 1)
    .Case("unroll_and_jam", 1)
    .Case("nounroll_and_jam", 1)
    .Case("loop", 1)
    .Case("unroll", 1)
    .Case("nounroll", 1)
    .Case("unroll_and_jam", 1)
    .Case("nounroll_and_jam", 1)
    .Case("loop", 1)
    .Case("unroll", 1)
    .Case("nounroll", 1)
    .Case("unroll_and_jam", 1)
    .Case("nounroll_and_jam", 1)
    .Case("loop", 1)
    .Case("unroll", 1)
    .Case("nounroll", 1)
    .Case("unroll_and_jam", 1)
    .Case("nounroll_and_jam", 1)
    .Case("loop", 1)
    .Case("unroll", 1)
    .Case("nounroll", 1)
    .Case("unroll_and_jam", 1)
    .Case("nounroll_and_jam", 1)
    .Case("declare simd", 1)
    .Case("declare target", 1)
    .Case("declare variant", 1)
    .Default(0);
case AttributeCommonInfo::Syntax::AS_HLSLSemantic:
  return llvm::StringSwitch<int>(Name)
    .Case("register", 1)
    .Case("SV_DispatchThreadID", 1)
    .Case("SV_GroupIndex", 1)
    .Default(0);
case AttributeCommonInfo::Syntax::AS_CXX11: {
if (ScopeName == "") {
  return llvm::StringSwitch<int>(Name)
    .Case("noreturn", LangOpts.CPlusPlus11 ? 200809 : 0)
    .Case("carries_dependency", LangOpts.CPlusPlus11 ? 200809 : 0)
    .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
    .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
    .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("likely", LangOpts.CPlusPlus11 ? 201803 : 0)
    .Case("no_unique_address", true && ( Target.getCXXABI().isItaniumFamily() ) && LangOpts.CPlusPlus11 ? 201803 : 0)
    .Case("unlikely", LangOpts.CPlusPlus11 ? 201803 : 0)
    .Case("maybe_unused", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("nodiscard", LangOpts.CPlusPlus11 ? 201907 : 0)
    .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0)
    .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0)
    .Default(0);
} else if (ScopeName == "clang") {
  return llvm::StringSwitch<int>(Name)
    .Case("aarch64_sve_pcs", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("aarch64_vector_pcs", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("amdgpu_flat_work_group_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("amdgpu_kernel", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("amdgpu_num_sgpr", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("amdgpu_num_vgpr", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("amdgpu_waves_per_eu", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("acquire_handle", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("address_space", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("always_destroy", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("always_inline", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("annotate", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("annotate_type", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_arc_weak_reference_unavailable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("argument_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pointer_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("argument_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pointer_with_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .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)
    .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)
    .Case("assert_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("assert_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("assert_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("assert_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("assume", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("availability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("preserve_access_index", true && (T.getArch() == llvm::Triple::bpfel || T.getArch() == llvm::Triple::bpfeb) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("btf_decl_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("btf_type_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("blocks", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("builtin_alias", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cf_audited_transfer", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cf_consumed", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("guard", true && (T.getOS() == llvm::Triple::Win32) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cfi_canonical_jump_table", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cf_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cf_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cf_unknown_transfer", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cpu_dispatch", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cpu_specific", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("callable_when", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("callback", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("called_once", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("require_constant_initialization", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("consumable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("consumable_auto_cast_state", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("consumable_set_state_on_read", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("convergent", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("diagnose_as_builtin", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("disable_sanitizer_instrumentation", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("disable_tail_calls", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("enforce_tcb", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("enforce_tcb_leaf", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("enum_extensibility", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("exclude_from_explicit_instantiation", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("external_source_symbol", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("flag_enum", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("guarded_var", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ibaction", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("iboutlet", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("iboutletcollection", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("intel_ocl_bicc", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("internal_linkage", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("lto_visibility_public", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("lifetimebound", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("loader_uninitialized", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("mig_server_routine", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("matrix_type", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("maybe_undef", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("minsize", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("min_vector_width", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("musttail", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ns_consumed", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ns_consumes_self", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ns_returns_autoreleased", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ns_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ns_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("neon_polyvector_type", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("neon_vector_type", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_builtin", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("noderef", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_destroy", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("noduplicate", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("noescape", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("noinline", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nomerge", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_memory", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_speculative_load_hardening", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_stack_protector", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_thread_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nouwtable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("not_tail_called", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("os_consumed", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("os_consumes_this", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("os_returns_not_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("os_returns_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("os_returns_retained_on_non_zero", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("os_returns_retained_on_zero", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_boxable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_bridge", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_bridge_mutable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_bridge_related", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_class_stub", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_designated_initializer", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_direct", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_direct_members", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_exception", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_protocol_requires_explicit_implementation", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_externally_retained", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_gc", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_independent_class", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_method_family", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("NSObject", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_nonlazy_class", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_non_runtime_protocol", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_ownership", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_precise_lifetime", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_requires_property_definitions", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_requires_super", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_returns_inner_pointer", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_root_class", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_runtime_name", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_runtime_visible", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("objc_subclassing_restricted", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_constant", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_generic", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_global", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_global_device", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_global_host", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_local", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("opencl_private", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("optnone", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("overloadable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_holds", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_returns", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ownership_takes", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("param_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pascal", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pass_object_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pass_dynamic_object_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pass_object_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pass_dynamic_object_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("preferred_name", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("preserve_all", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("preserve_most", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pt_guarded_var", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("enforce_read_only_placement", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("reinitializes", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_generic_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("unlock_function", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("release_handle", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("exclusive_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("requires_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("shared_locks_required", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("return_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("sycl_kernel", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("sycl_special_class", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("scoped_lockable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("set_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("speculative_load_hardening", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("standalone_debug", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swift_async", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swiftasynccall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swift_async_context", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swift_async_error", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swiftcall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swift_context", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swift_error_result", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("swift_indirect_result", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("test_typestate", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("trivial_abi", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("try_acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("try_acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("try_acquire_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("try_acquire_shared_capability", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("type_tag_for_datatype", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("type_visibility", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("unavailable", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("uninitialized", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("use_handle", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("using_if_exists", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("vecreturn", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("vectorcall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0)
    .Case("weak_import", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("export_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("import_module", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("import_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("xray_always_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("xray_never_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("xray_always_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("xray_never_instrument", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("xray_log_args", LangOpts.CPlusPlus11 ? 1 : 0)
    .Default(0);
} else if (ScopeName == "gnu") {
  return llvm::StringSwitch<int>(Name)
    .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)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("signal", true && (T.getArch() == llvm::Triple::avr) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("abi_tag", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("alias", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("aligned", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("alloc_align", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("alloc_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("always_inline", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("artificial", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("assume_aligned", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cdecl", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cleanup", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("cold", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("common", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("const", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("__const", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("const", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("__const", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("constructor", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("deprecated", LangOpts.CPlusPlus11 ? 201309 : 0)
    .Case("destructor", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("error", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("warning", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("error", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("warning", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("fallthrough", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("fastcall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("flatten", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("format", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("format_arg", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("function_return", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("gnu_inline", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("hot", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("init_priority", true && ( !Target.getTriple().isOSzOS() ) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("leaf", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ms_abi", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("ms_struct", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("may_alias", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .Case("mode", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("naked", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nocommon", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nodebug", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("noinline", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_instrument_function", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_profile_instrument_function", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_randomize_layout", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("noreturn", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_address_safety_analysis", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_address", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_sanitize_thread", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("no_split_stack", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nothrow", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("nonnull", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("packed", LangOpts.CPlusPlus11 ? 1 : 0)
    .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)
    .Case("pcs", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("pure", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("randomize_layout", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("regcall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("regparm", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("malloc", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("retain", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("returns_nonnull", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("returns_twice", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("section", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("selectany", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("sentinel", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("stdcall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("sysv_abi", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("tls_model", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("target", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("target_clones", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("target_version", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("thiscall", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("transparent_union", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("unused", LangOpts.CPlusPlus11 ? 201603 : 0)
    .Case("used", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("vector_size", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("visibility", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("warn_unused", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("warn_unused_result", LangOpts.CPlusPlus11 ? 201907 : 0)
    .Case("weak", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("weakref", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("zero_call_used_regs", LangOpts.CPlusPlus11 ? 1 : 0)
    .Default(0);
} else if (ScopeName == "gsl") {
  return llvm::StringSwitch<int>(Name)
    .Case("Owner", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("Pointer", LangOpts.CPlusPlus11 ? 1 : 0)
    .Case("suppress", LangOpts.CPlusPlus11 ? 1 : 0)
    .Default(0);
}
} break;
case AttributeCommonInfo::Syntax::AS_C2x: {
if (ScopeName == "") {
  return llvm::StringSwitch<int>(Name)
    .Case("noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0)
    .Case("_Noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0)
    .Case("noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0)
    .Case("_Noreturn", LangOpts.DoubleSquareBracketAttributes ? 202202 : 0)
    .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 201904 : 0)
    .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 201904 : 0)
    .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 201910 : 0)
    .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 201910 : 0)
    .Case("unused", LangOpts.DoubleSquareBracketAttributes ? 202106 : 0)
    .Case("maybe_unused", LangOpts.DoubleSquareBracketAttributes ? 202106 : 0)
    .Case("nodiscard", LangOpts.DoubleSquareBracketAttributes ? 202003 : 0)
    .Case("warn_unused_result", LangOpts.DoubleSquareBracketAttributes ? 202003 : 0)
    .Default(0);
} else if (ScopeName == "clang") {
  return llvm::StringSwitch<int>(Name)
    .Case("aarch64_sve_pcs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("aarch64_vector_pcs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("amdgpu_kernel", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("acquire_handle", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("address_space", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("always_inline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("annotate", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("annotate_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_arc_weak_reference_unavailable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("argument_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pointer_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("argument_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pointer_with_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .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)
    .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)
    .Case("assume", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("availability", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("preserve_access_index", true && (T.getArch() == llvm::Triple::bpfel || T.getArch() == llvm::Triple::bpfeb) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("btf_decl_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("btf_type_tag", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("blocks", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("builtin_alias", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cf_audited_transfer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cf_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("guard", true && (T.getOS() == llvm::Triple::Win32) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cfi_canonical_jump_table", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cf_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cf_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cf_unknown_transfer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cpu_dispatch", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cpu_specific", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("callback", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("called_once", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("convergent", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("diagnose_as_builtin", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("disable_sanitizer_instrumentation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("disable_tail_calls", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("enforce_tcb", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("enforce_tcb_leaf", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("enum_extensibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("exclude_from_explicit_instantiation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("external_source_symbol", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("flag_enum", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ibaction", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("iboutlet", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("iboutletcollection", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("internal_linkage", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("lto_visibility_public", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("likely", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("loader_uninitialized", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("mig_server_routine", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("matrix_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("maybe_undef", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("minsize", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("min_vector_width", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("musttail", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ns_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ns_consumes_self", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ns_returns_autoreleased", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ns_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ns_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("neon_polyvector_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("neon_vector_type", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_builtin", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("noderef", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("noduplicate", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("noescape", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("noinline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nomerge", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_memory", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_speculative_load_hardening", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_stack_protector", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_thread_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nouwtable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("not_tail_called", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("os_consumed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("os_consumes_this", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("os_returns_not_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("os_returns_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("os_returns_retained_on_non_zero", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("os_returns_retained_on_zero", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_boxable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_bridge", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_bridge_mutable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_bridge_related", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_class_stub", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_designated_initializer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_direct", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_direct_members", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_exception", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_protocol_requires_explicit_implementation", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_externally_retained", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_gc", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_independent_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_method_family", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("NSObject", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_nonlazy_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_non_runtime_protocol", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_ownership", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_precise_lifetime", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_requires_property_definitions", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_requires_super", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_returns_inner_pointer", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_root_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_runtime_name", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_runtime_visible", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("objc_subclassing_restricted", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_constant", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_generic", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_global", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_global_device", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_global_host", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_local", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("opencl_private", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("optnone", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("overloadable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_holds", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_returns", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ownership_takes", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pascal", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pass_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pass_dynamic_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pass_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pass_dynamic_object_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("preserve_all", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("preserve_most", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("enforce_read_only_placement", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("release_handle", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("sycl_kernel", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("sycl_special_class", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("speculative_load_hardening", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swift_async", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swiftasynccall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swift_async_context", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swift_async_error", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swiftcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swift_context", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swift_error_result", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("swift_indirect_result", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("type_tag_for_datatype", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("type_visibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("unavailable", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("unlikely", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("use_handle", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("vectorcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("weak_import", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("export_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("import_module", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("import_name", true && (T.getArch() == llvm::Triple::wasm32 || T.getArch() == llvm::Triple::wasm64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("xray_always_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("xray_never_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("xray_always_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("xray_never_instrument", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("xray_log_args", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Default(0);
} else if (ScopeName == "gnu") {
  return llvm::StringSwitch<int>(Name)
    .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)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::avr) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("signal", true && (T.getArch() == llvm::Triple::avr) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("alias", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("aligned", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("alloc_align", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("alloc_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("always_inline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_caller_saved_registers", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nocf_check", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("artificial", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("assume_aligned", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cdecl", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cleanup", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("cold", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("common", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("__const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("__const", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("constructor", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("dllexport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("dllimport", true && ( Target.getTriple().hasDLLImportExport() ) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("deprecated", LangOpts.DoubleSquareBracketAttributes ? 201904 : 0)
    .Case("destructor", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("error", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("warning", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("error", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("warning", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("fallthrough", LangOpts.DoubleSquareBracketAttributes ? 201910 : 0)
    .Case("fastcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("flatten", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("format", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("format_arg", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("function_return", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("gnu_inline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("hot", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ifunc", true && (T.getObjectFormat() == llvm::Triple::ELF) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("leaf", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ms_abi", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::msp430) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("ms_struct", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("may_alias", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("micromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("mips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .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)
    .Case("mode", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("naked", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nocommon", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nodebug", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("noinline", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_instrument_function", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nomicromips", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nomips16", true && (T.getArch() == llvm::Triple::mips || T.getArch() == llvm::Triple::mipsel) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_profile_instrument_function", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_randomize_layout", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("noreturn", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_address_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_address", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_thread", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_address_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_address", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_thread", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_address_safety_analysis", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_address", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_sanitize_thread", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("no_split_stack", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nothrow", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("nonnull", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("packed", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .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)
    .Case("pcs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("pure", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("interrupt", true && (T.getArch() == llvm::Triple::riscv32 || T.getArch() == llvm::Triple::riscv64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("randomize_layout", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("regcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("regparm", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("malloc", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("retain", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("returns_nonnull", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("returns_twice", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("section", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("selectany", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("sentinel", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("stdcall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("sysv_abi", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("tls_model", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("target", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("target_clones", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("target_version", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("thiscall", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("transparent_union", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("unused", LangOpts.DoubleSquareBracketAttributes ? 202106 : 0)
    .Case("used", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("vector_size", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("visibility", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("warn_unused", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("warn_unused_result", LangOpts.DoubleSquareBracketAttributes ? 202003 : 0)
    .Case("weak", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("weakref", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("force_align_arg_pointer", true && (T.getArch() == llvm::Triple::x86 || T.getArch() == llvm::Triple::x86_64) && LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Case("zero_call_used_regs", LangOpts.DoubleSquareBracketAttributes ? 1 : 0)
    .Default(0);
}
} break;
case AttributeCommonInfo::Syntax::AS_Keyword:
case AttributeCommonInfo::Syntax::AS_ContextSensitiveKeyword:
  llvm_unreachable("hasAttribute not supported for keyword");
  return 0;
}
