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

     1  // Code generated by "string2enum -linecomment -type DwarfLang ../../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.DwarfLangC89-1]
    16  	_ = x[enum.DwarfLangC-2]
    17  	_ = x[enum.DwarfLangAda83-3]
    18  	_ = x[enum.DwarfLangCPlusPlus-4]
    19  	_ = x[enum.DwarfLangCobol74-5]
    20  	_ = x[enum.DwarfLangCobol85-6]
    21  	_ = x[enum.DwarfLangFortran77-7]
    22  	_ = x[enum.DwarfLangFortran90-8]
    23  	_ = x[enum.DwarfLangPascal83-9]
    24  	_ = x[enum.DwarfLangModula2-10]
    25  	_ = x[enum.DwarfLangJava-11]
    26  	_ = x[enum.DwarfLangC99-12]
    27  	_ = x[enum.DwarfLangAda95-13]
    28  	_ = x[enum.DwarfLangFortran95-14]
    29  	_ = x[enum.DwarfLangPLI-15]
    30  	_ = x[enum.DwarfLangObjC-16]
    31  	_ = x[enum.DwarfLangObjCPlusPlus-17]
    32  	_ = x[enum.DwarfLangUPC-18]
    33  	_ = x[enum.DwarfLangD-19]
    34  	_ = x[enum.DwarfLangPython-20]
    35  	_ = x[enum.DwarfLangOpenCL-21]
    36  	_ = x[enum.DwarfLangGo-22]
    37  	_ = x[enum.DwarfLangModula3-23]
    38  	_ = x[enum.DwarfLangHaskell-24]
    39  	_ = x[enum.DwarfLangCPlusPlus03-25]
    40  	_ = x[enum.DwarfLangCPlusPlus11-26]
    41  	_ = x[enum.DwarfLangOCaml-27]
    42  	_ = x[enum.DwarfLangRust-28]
    43  	_ = x[enum.DwarfLangC11-29]
    44  	_ = x[enum.DwarfLangSwift-30]
    45  	_ = x[enum.DwarfLangJulia-31]
    46  	_ = x[enum.DwarfLangDylan-32]
    47  	_ = x[enum.DwarfLangCPlusPlus14-33]
    48  	_ = x[enum.DwarfLangFortran03-34]
    49  	_ = x[enum.DwarfLangFortran08-35]
    50  	_ = x[enum.DwarfLangRenderScript-36]
    51  	_ = x[enum.DwarfLangBLISS-37]
    52  	_ = x[enum.DwarfLangMipsAssembler-32769]
    53  	_ = x[enum.DwarfLangGoogleRenderScript-36439]
    54  	_ = x[enum.DwarfLangBorlandDelphi-45056]
    55  }
    56  
    57  const (
    58  	_DwarfLang_name_0 = "DW_LANG_C89DW_LANG_CDW_LANG_Ada83DW_LANG_C_plus_plusDW_LANG_Cobol74DW_LANG_Cobol85DW_LANG_Fortran77DW_LANG_Fortran90DW_LANG_Pascal83DW_LANG_Modula2DW_LANG_JavaDW_LANG_C99DW_LANG_Ada95DW_LANG_Fortran95DW_LANG_PLIDW_LANG_ObjCDW_LANG_ObjC_plus_plusDW_LANG_UPCDW_LANG_DDW_LANG_PythonDW_LANG_OpenCLDW_LANG_GoDW_LANG_Modula3DW_LANG_HaskellDW_LANG_C_plus_plus_03DW_LANG_C_plus_plus_11DW_LANG_OCamlDW_LANG_RustDW_LANG_C11DW_LANG_SwiftDW_LANG_JuliaDW_LANG_DylanDW_LANG_C_plus_plus_14DW_LANG_Fortran03DW_LANG_Fortran08DW_LANG_RenderScriptDW_LANG_BLISS"
    59  	_DwarfLang_name_1 = "DW_LANG_Mips_Assembler"
    60  	_DwarfLang_name_2 = "DW_LANG_GOOGLE_RenderScript"
    61  	_DwarfLang_name_3 = "DW_LANG_BORLAND_Delphi"
    62  )
    63  
    64  var (
    65  	_DwarfLang_index_0 = [...]uint16{0, 11, 20, 33, 52, 67, 82, 99, 116, 132, 147, 159, 170, 183, 200, 211, 223, 245, 256, 265, 279, 293, 303, 318, 333, 355, 377, 390, 402, 413, 426, 439, 452, 474, 491, 508, 528, 541}
    66  )
    67  
    68  // DwarfLangFromString returns the DwarfLang enum corresponding to s.
    69  func DwarfLangFromString(s string) enum.DwarfLang {
    70  	if len(s) == 0 {
    71  		return 0
    72  	}
    73  	for i := range _DwarfLang_index_0[:len(_DwarfLang_index_0)-1] {
    74  		if s == _DwarfLang_name_0[_DwarfLang_index_0[i]:_DwarfLang_index_0[i+1]] {
    75  			return enum.DwarfLang(i + 1)
    76  		}
    77  	}
    78  	if s == _DwarfLang_name_1 {
    79  		return enum.DwarfLang(32769)
    80  	}
    81  	if s == _DwarfLang_name_2 {
    82  		return enum.DwarfLang(36439)
    83  	}
    84  	if s == _DwarfLang_name_3 {
    85  		return enum.DwarfLang(45056)
    86  	}
    87  	panic(fmt.Errorf("unable to locate DwarfLang enum corresponding to %q", s))
    88  }
    89  
    90  func _(s string) {
    91  	// Check for duplicate string values in type "DwarfLang".
    92  	switch s {
    93  	// 1
    94  	case "DW_LANG_C89":
    95  	// 2
    96  	case "DW_LANG_C":
    97  	// 3
    98  	case "DW_LANG_Ada83":
    99  	// 4
   100  	case "DW_LANG_C_plus_plus":
   101  	// 5
   102  	case "DW_LANG_Cobol74":
   103  	// 6
   104  	case "DW_LANG_Cobol85":
   105  	// 7
   106  	case "DW_LANG_Fortran77":
   107  	// 8
   108  	case "DW_LANG_Fortran90":
   109  	// 9
   110  	case "DW_LANG_Pascal83":
   111  	// 10
   112  	case "DW_LANG_Modula2":
   113  	// 11
   114  	case "DW_LANG_Java":
   115  	// 12
   116  	case "DW_LANG_C99":
   117  	// 13
   118  	case "DW_LANG_Ada95":
   119  	// 14
   120  	case "DW_LANG_Fortran95":
   121  	// 15
   122  	case "DW_LANG_PLI":
   123  	// 16
   124  	case "DW_LANG_ObjC":
   125  	// 17
   126  	case "DW_LANG_ObjC_plus_plus":
   127  	// 18
   128  	case "DW_LANG_UPC":
   129  	// 19
   130  	case "DW_LANG_D":
   131  	// 20
   132  	case "DW_LANG_Python":
   133  	// 21
   134  	case "DW_LANG_OpenCL":
   135  	// 22
   136  	case "DW_LANG_Go":
   137  	// 23
   138  	case "DW_LANG_Modula3":
   139  	// 24
   140  	case "DW_LANG_Haskell":
   141  	// 25
   142  	case "DW_LANG_C_plus_plus_03":
   143  	// 26
   144  	case "DW_LANG_C_plus_plus_11":
   145  	// 27
   146  	case "DW_LANG_OCaml":
   147  	// 28
   148  	case "DW_LANG_Rust":
   149  	// 29
   150  	case "DW_LANG_C11":
   151  	// 30
   152  	case "DW_LANG_Swift":
   153  	// 31
   154  	case "DW_LANG_Julia":
   155  	// 32
   156  	case "DW_LANG_Dylan":
   157  	// 33
   158  	case "DW_LANG_C_plus_plus_14":
   159  	// 34
   160  	case "DW_LANG_Fortran03":
   161  	// 35
   162  	case "DW_LANG_Fortran08":
   163  	// 36
   164  	case "DW_LANG_RenderScript":
   165  	// 37
   166  	case "DW_LANG_BLISS":
   167  	// 32769
   168  	case "DW_LANG_Mips_Assembler":
   169  	// 36439
   170  	case "DW_LANG_GOOGLE_RenderScript":
   171  	// 45056
   172  	case "DW_LANG_BORLAND_Delphi":
   173  	}
   174  }