github.com/llir/llvm@v0.3.6/asm/enum/funcattr_string2enum.go (about)

     1  // Code generated by "string2enum -linecomment -type FuncAttr ../../ir/enum"; DO NOT EDIT.
     2  
     3  package enum
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/llir/llvm/ir/enum"
     9  )
    10  
    11  func _() {
    12  	// An "invalid array index" compiler error signifies that the constant values have changed.
    13  	// Re-run the string2enum command to generate them again.
    14  	var x [1]struct{}
    15  	_ = x[enum.FuncAttrAlwaysInline-0]
    16  	_ = x[enum.FuncAttrArgMemOnly-1]
    17  	_ = x[enum.FuncAttrBuiltin-2]
    18  	_ = x[enum.FuncAttrCold-3]
    19  	_ = x[enum.FuncAttrConvergent-4]
    20  	_ = x[enum.FuncAttrDisableSanitizerInstrumentation-5]
    21  	_ = x[enum.FuncAttrHot-6]
    22  	_ = x[enum.FuncAttrInaccessibleMemOnly-7]
    23  	_ = x[enum.FuncAttrInaccessibleMemOrArgMemOnly-8]
    24  	_ = x[enum.FuncAttrInlineHint-9]
    25  	_ = x[enum.FuncAttrJumpTable-10]
    26  	_ = x[enum.FuncAttrMinSize-11]
    27  	_ = x[enum.FuncAttrMustProgress-12]
    28  	_ = x[enum.FuncAttrNaked-13]
    29  	_ = x[enum.FuncAttrNoBuiltin-14]
    30  	_ = x[enum.FuncAttrNoCFCheck-15]
    31  	_ = x[enum.FuncAttrNoCallback-16]
    32  	_ = x[enum.FuncAttrNoDuplicate-17]
    33  	_ = x[enum.FuncAttrNoFree-18]
    34  	_ = x[enum.FuncAttrNoImplicitFloat-19]
    35  	_ = x[enum.FuncAttrNoInline-20]
    36  	_ = x[enum.FuncAttrNoMerge-21]
    37  	_ = x[enum.FuncAttrNoProfile-22]
    38  	_ = x[enum.FuncAttrNoRecurse-23]
    39  	_ = x[enum.FuncAttrNoRedZone-24]
    40  	_ = x[enum.FuncAttrNoReturn-25]
    41  	_ = x[enum.FuncAttrNoSanitizeCoverage-26]
    42  	_ = x[enum.FuncAttrNoSync-27]
    43  	_ = x[enum.FuncAttrNoUnwind-28]
    44  	_ = x[enum.FuncAttrNonLazyBind-29]
    45  	_ = x[enum.FuncAttrNullPointerIsValid-30]
    46  	_ = x[enum.FuncAttrOptForFuzzing-31]
    47  	_ = x[enum.FuncAttrOptNone-32]
    48  	_ = x[enum.FuncAttrOptSize-33]
    49  	_ = x[enum.FuncAttrReadNone-34]
    50  	_ = x[enum.FuncAttrReadOnly-35]
    51  	_ = x[enum.FuncAttrReturnsTwice-36]
    52  	_ = x[enum.FuncAttrSSP-37]
    53  	_ = x[enum.FuncAttrSSPReq-38]
    54  	_ = x[enum.FuncAttrSSPStrong-39]
    55  	_ = x[enum.FuncAttrSafeStack-40]
    56  	_ = x[enum.FuncAttrSanitizeAddress-41]
    57  	_ = x[enum.FuncAttrSanitizeHWAddress-42]
    58  	_ = x[enum.FuncAttrSanitizeMemTag-43]
    59  	_ = x[enum.FuncAttrSanitizeMemory-44]
    60  	_ = x[enum.FuncAttrSanitizeThread-45]
    61  	_ = x[enum.FuncAttrShadowCallStack-46]
    62  	_ = x[enum.FuncAttrSpeculatable-47]
    63  	_ = x[enum.FuncAttrSpeculativeLoadHardening-48]
    64  	_ = x[enum.FuncAttrStrictFP-49]
    65  	_ = x[enum.FuncAttrUwtable-50]
    66  	_ = x[enum.FuncAttrWillReturn-51]
    67  	_ = x[enum.FuncAttrWriteOnly-52]
    68  }
    69  
    70  const _FuncAttr_name = "alwaysinlineargmemonlybuiltincoldconvergentdisable_sanitizer_instrumentationhotinaccessiblememonlyinaccessiblemem_or_argmemonlyinlinehintjumptableminsizemustprogressnakednobuiltinnocf_checknocallbacknoduplicatenofreenoimplicitfloatnoinlinenomergenoprofilenorecursenoredzonenoreturnnosanitize_coveragenosyncnounwindnonlazybindnull_pointer_is_validoptforfuzzingoptnoneoptsizereadnonereadonlyreturns_twicesspsspreqsspstrongsafestacksanitize_addresssanitize_hwaddresssanitize_memtagsanitize_memorysanitize_threadshadowcallstackspeculatablespeculative_load_hardeningstrictfpuwtablewillreturnwriteonly"
    71  
    72  var _FuncAttr_index = [...]uint16{0, 12, 22, 29, 33, 43, 76, 79, 98, 127, 137, 146, 153, 165, 170, 179, 189, 199, 210, 216, 231, 239, 246, 255, 264, 273, 281, 300, 306, 314, 325, 346, 359, 366, 373, 381, 389, 402, 405, 411, 420, 429, 445, 463, 478, 493, 508, 523, 535, 561, 569, 576, 586, 595}
    73  
    74  // FuncAttrFromString returns the FuncAttr enum corresponding to s.
    75  func FuncAttrFromString(s string) enum.FuncAttr {
    76  	if len(s) == 0 {
    77  		return 0
    78  	}
    79  	for i := range _FuncAttr_index[:len(_FuncAttr_index)-1] {
    80  		if s == _FuncAttr_name[_FuncAttr_index[i]:_FuncAttr_index[i+1]] {
    81  			return enum.FuncAttr(i)
    82  		}
    83  	}
    84  	panic(fmt.Errorf("unable to locate FuncAttr enum corresponding to %q", s))
    85  }
    86  
    87  func _(s string) {
    88  	// Check for duplicate string values in type "FuncAttr".
    89  	switch s {
    90  	// 0
    91  	case "alwaysinline":
    92  	// 1
    93  	case "argmemonly":
    94  	// 2
    95  	case "builtin":
    96  	// 3
    97  	case "cold":
    98  	// 4
    99  	case "convergent":
   100  	// 5
   101  	case "disable_sanitizer_instrumentation":
   102  	// 6
   103  	case "hot":
   104  	// 7
   105  	case "inaccessiblememonly":
   106  	// 8
   107  	case "inaccessiblemem_or_argmemonly":
   108  	// 9
   109  	case "inlinehint":
   110  	// 10
   111  	case "jumptable":
   112  	// 11
   113  	case "minsize":
   114  	// 12
   115  	case "mustprogress":
   116  	// 13
   117  	case "naked":
   118  	// 14
   119  	case "nobuiltin":
   120  	// 15
   121  	case "nocf_check":
   122  	// 16
   123  	case "nocallback":
   124  	// 17
   125  	case "noduplicate":
   126  	// 18
   127  	case "nofree":
   128  	// 19
   129  	case "noimplicitfloat":
   130  	// 20
   131  	case "noinline":
   132  	// 21
   133  	case "nomerge":
   134  	// 22
   135  	case "noprofile":
   136  	// 23
   137  	case "norecurse":
   138  	// 24
   139  	case "noredzone":
   140  	// 25
   141  	case "noreturn":
   142  	// 26
   143  	case "nosanitize_coverage":
   144  	// 27
   145  	case "nosync":
   146  	// 28
   147  	case "nounwind":
   148  	// 29
   149  	case "nonlazybind":
   150  	// 30
   151  	case "null_pointer_is_valid":
   152  	// 31
   153  	case "optforfuzzing":
   154  	// 32
   155  	case "optnone":
   156  	// 33
   157  	case "optsize":
   158  	// 34
   159  	case "readnone":
   160  	// 35
   161  	case "readonly":
   162  	// 36
   163  	case "returns_twice":
   164  	// 37
   165  	case "ssp":
   166  	// 38
   167  	case "sspreq":
   168  	// 39
   169  	case "sspstrong":
   170  	// 40
   171  	case "safestack":
   172  	// 41
   173  	case "sanitize_address":
   174  	// 42
   175  	case "sanitize_hwaddress":
   176  	// 43
   177  	case "sanitize_memtag":
   178  	// 44
   179  	case "sanitize_memory":
   180  	// 45
   181  	case "sanitize_thread":
   182  	// 46
   183  	case "shadowcallstack":
   184  	// 47
   185  	case "speculatable":
   186  	// 48
   187  	case "speculative_load_hardening":
   188  	// 49
   189  	case "strictfp":
   190  	// 50
   191  	case "uwtable":
   192  	// 51
   193  	case "willreturn":
   194  	// 52
   195  	case "writeonly":
   196  	}
   197  }