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

     1  // Package enum defines enumerate types of LLVM IR.
     2  package enum
     3  
     4  //go:generate stringer -linecomment -type AtomicOp
     5  
     6  // AtomicOp is an AtomicRMW binary operation.
     7  type AtomicOp uint8
     8  
     9  // AtomicRMW binary operations.
    10  const (
    11  	AtomicOpAdd  AtomicOp = iota + 1 // add
    12  	AtomicOpAnd                      // and
    13  	AtomicOpFAdd                     // fadd
    14  	AtomicOpFSub                     // fsub
    15  	AtomicOpMax                      // max
    16  	AtomicOpMin                      // min
    17  	AtomicOpNAnd                     // nand
    18  	AtomicOpOr                       // or
    19  	AtomicOpSub                      // sub
    20  	AtomicOpUMax                     // umax
    21  	AtomicOpUMin                     // umin
    22  	AtomicOpXChg                     // xchg
    23  	AtomicOpXor                      // xor
    24  )
    25  
    26  //go:generate stringer -linecomment -type AtomicOrdering
    27  
    28  // AtomicOrdering is an atomic ordering attribute.
    29  type AtomicOrdering uint8
    30  
    31  // Atomic ordering attributes.
    32  //
    33  // ref: include/llvm/Support/AtomicOrdering.h (LLVM 13.0) (enum class AtomicOrdering)
    34  // ref: include/llvm/Support/AtomicOrdering.h (LLVM 13.0) (toIRString(AtomicOrdering))
    35  const (
    36  	// not_atomic
    37  	AtomicOrderingNone      AtomicOrdering = 0 // none
    38  	AtomicOrderingUnordered AtomicOrdering = 1 // unordered
    39  	AtomicOrderingMonotonic AtomicOrdering = 2 // monotonic
    40  	//AtomicOrderingConsume AtomicOrdering = 3 // consume
    41  	AtomicOrderingAcquire                AtomicOrdering = 4 // acquire
    42  	AtomicOrderingRelease                AtomicOrdering = 5 // release
    43  	AtomicOrderingAcquireRelease         AtomicOrdering = 6 // acq_rel
    44  	AtomicOrderingSequentiallyConsistent AtomicOrdering = 7 // seq_cst
    45  )
    46  
    47  //go:generate stringer -linecomment -type CallingConv
    48  
    49  // CallingConv is a calling convention.
    50  type CallingConv uint16
    51  
    52  // Calling conventions.
    53  //
    54  // From include/llvm/IR/CallingConv.h (LLVM 13.0)
    55  const (
    56  	CallingConvNone CallingConv = 0 // none
    57  	// Note, C calling convention is defined as 0 in LLVM. To have the zero-value
    58  	// calling convention mean no calling convention, re-define C calling
    59  	// convention as 1, and use 0 for none.
    60  	CallingConvC            CallingConv = 1  // ccc
    61  	CallingConvFast         CallingConv = 8  // fastcc
    62  	CallingConvCold         CallingConv = 9  // coldcc
    63  	CallingConvGHC          CallingConv = 10 // ghccc
    64  	CallingConvHiPE         CallingConv = 11 // cc 11
    65  	CallingConvWebKitJS     CallingConv = 12 // webkit_jscc
    66  	CallingConvAnyReg       CallingConv = 13 // anyregcc
    67  	CallingConvPreserveMost CallingConv = 14 // preserve_mostcc
    68  	CallingConvPreserveAll  CallingConv = 15 // preserve_allcc
    69  	CallingConvSwift        CallingConv = 16 // swiftcc
    70  	CallingConvCXXFastTLS   CallingConv = 17 // cxx_fast_tlscc
    71  	CallingConvTail         CallingConv = 18 // tailcc
    72  	CallingConvCFGuardCheck CallingConv = 19 // cfguard_checkcc
    73  	CallingConvSwiftTail    CallingConv = 20 // swifttailcc
    74  
    75  	// Start of target-specific calling conventions.
    76  	CallingConvFirstTarget = CallingConvX86StdCall
    77  
    78  	CallingConvX86StdCall      CallingConv = 64 // x86_stdcallcc
    79  	CallingConvX86FastCall     CallingConv = 65 // x86_fastcallcc
    80  	CallingConvARM_APCS        CallingConv = 66 // arm_apcscc
    81  	CallingConvARM_AAPCS       CallingConv = 67 // arm_aapcscc
    82  	CallingConvARM_AAPCS_VFP   CallingConv = 68 // arm_aapcs_vfpcc
    83  	CallingConvMSP430Interrupt CallingConv = 69 // msp430_intrcc
    84  	CallingConvX86ThisCall     CallingConv = 70 // x86_thiscallcc
    85  	CallingConvPTXKernel       CallingConv = 71 // ptx_kernel
    86  	CallingConvPTXDevice       CallingConv = 72 // ptx_device
    87  
    88  	CallingConvSPIRFunc             CallingConv = 75  // spir_func
    89  	CallingConvSPIRKernel           CallingConv = 76  // spir_kernel
    90  	CallingConvIntelOCL_BI          CallingConv = 77  // intel_ocl_bicc
    91  	CallingConvX86_64SysV           CallingConv = 78  // x86_64_sysvcc
    92  	CallingConvWin64                CallingConv = 79  // win64cc
    93  	CallingConvX86VectorCall        CallingConv = 80  // x86_vectorcallcc
    94  	CallingConvHHVM                 CallingConv = 81  // hhvmcc
    95  	CallingConvHHVM_C               CallingConv = 82  // hhvm_ccc
    96  	CallingConvX86Interrupt         CallingConv = 83  // x86_intrcc
    97  	CallingConvAVRInterrupt         CallingConv = 84  // avr_intrcc
    98  	CallingConvAVRSignal            CallingConv = 85  // avr_signalcc
    99  	CallingConvAVRBuiltin           CallingConv = 86  // cc 86
   100  	CallingConvAMDGPU_VS            CallingConv = 87  // amdgpu_vs
   101  	CallingConvAMDGPU_GS            CallingConv = 88  // amdgpu_gs
   102  	CallingConvAMDGPU_PS            CallingConv = 89  // amdgpu_ps
   103  	CallingConvAMDGPU_CS            CallingConv = 90  // amdgpu_cs
   104  	CallingConvAMDGPUKernel         CallingConv = 91  // amdgpu_kernel
   105  	CallingConvX86RegCall           CallingConv = 92  // x86_regcallcc
   106  	CallingConvAMDGPU_HS            CallingConv = 93  // amdgpu_hs
   107  	CallingConvMSP430Builtin        CallingConv = 94  // cc 94
   108  	CallingConvAMDGPU_LS            CallingConv = 95  // amdgpu_ls
   109  	CallingConvAMDGPU_ES            CallingConv = 96  // amdgpu_es
   110  	CallingConvAArch64VectorCall    CallingConv = 97  // aarch64_vector_pcs
   111  	CallingConvAArch64SVEVectorCall CallingConv = 98  // aarch64_sve_vector_pcs
   112  	CallingConvAMDGPUGfx            CallingConv = 100 // amdgpu_gfx
   113  	CallingConvM68kInterrupt                    = 101 // cc 101
   114  )
   115  
   116  //go:generate stringer -linecomment -type ChecksumKind
   117  
   118  // ChecksumKind is a checksum algorithm.
   119  type ChecksumKind uint8
   120  
   121  // Checksum algorithms.
   122  //
   123  // From include/llvm/IR/DebugInfoMetadata.h
   124  const (
   125  	ChecksumKindMD5  ChecksumKind = 1 // CSK_MD5
   126  	ChecksumKindSHA1 ChecksumKind = 2 // CSK_SHA1
   127  )
   128  
   129  //go:generate stringer -linecomment -type ClauseType
   130  
   131  // ClauseType specifies the clause type of a landingpad clause.
   132  type ClauseType uint8
   133  
   134  // Clause types.
   135  const (
   136  	ClauseTypeCatch  ClauseType = iota + 1 // catch
   137  	ClauseTypeFilter                       // filter
   138  )
   139  
   140  //go:generate stringer -type DIFlag
   141  
   142  // DIFlag is a debug info flag bitfield.
   143  type DIFlag uint64
   144  
   145  // Debug info flags.
   146  //
   147  // From include/llvm/IR/DebugInfoFlags.def (LLVM 13.0)
   148  const (
   149  	DIFlagZero                DIFlag = 0
   150  	DIFlagPrivate             DIFlag = 1
   151  	DIFlagProtected           DIFlag = 2
   152  	DIFlagPublic              DIFlag = 3
   153  	DIFlagFwdDecl             DIFlag = 1 << 2
   154  	DIFlagAppleBlock          DIFlag = 1 << 3
   155  	DIFlagReservedBit4        DIFlag = 1 << 4
   156  	DIFlagVirtual             DIFlag = 1 << 5
   157  	DIFlagArtificial          DIFlag = 1 << 6
   158  	DIFlagExplicit            DIFlag = 1 << 7
   159  	DIFlagPrototyped          DIFlag = 1 << 8
   160  	DIFlagObjcClassComplete   DIFlag = 1 << 9
   161  	DIFlagObjectPointer       DIFlag = 1 << 10
   162  	DIFlagVector              DIFlag = 1 << 11
   163  	DIFlagStaticMember        DIFlag = 1 << 12
   164  	DIFlagLValueReference     DIFlag = 1 << 13
   165  	DIFlagRValueReference     DIFlag = 1 << 14
   166  	DIFlagExportSymbols       DIFlag = 1 << 15
   167  	DIFlagSingleInheritance   DIFlag = 1 << 16
   168  	DIFlagMultipleInheritance DIFlag = 2 << 16
   169  	DIFlagVirtualInheritance  DIFlag = 3 << 16
   170  	DIFlagIntroducedVirtual   DIFlag = 1 << 18
   171  	DIFlagBitField            DIFlag = 1 << 19
   172  	DIFlagNoReturn            DIFlag = 1 << 20
   173  	DIFlagTypePassByValue     DIFlag = 1 << 22
   174  	DIFlagTypePassByReference DIFlag = 1 << 23
   175  	DIFlagEnumClass           DIFlag = 1 << 24
   176  	DIFlagThunk               DIFlag = 1 << 25
   177  	DIFlagNonTrivial          DIFlag = 1 << 26
   178  	DIFlagBigEndian           DIFlag = 1 << 27
   179  	DIFlagLittleEndian        DIFlag = 1 << 28
   180  	DIFlagAllCallsDescribed   DIFlag = 1 << 29
   181  
   182  	DIFlagIndirectVirtualBase DIFlag = DIFlagFwdDecl | DIFlagVirtual
   183  	// Mask for accessibility.
   184  	DIFlagAccessibility DIFlag = DIFlagPrivate | DIFlagProtected | DIFlagPublic
   185  	// Mask for inheritance.
   186  	DIFlagPtrToMemberRep DIFlag = DIFlagSingleInheritance | DIFlagMultipleInheritance | DIFlagVirtualInheritance
   187  
   188  	// Track first and last debug info flag, used by diFlagsString in
   189  	// ir/metadata/helper.go.
   190  	DIFlagFirst = DIFlagFwdDecl
   191  	DIFlagLast  = DIFlagAllCallsDescribed
   192  )
   193  
   194  //go:generate stringer -type DISPFlag
   195  
   196  // DISPFlag is a subprogram specific flag bitfield.
   197  type DISPFlag uint64
   198  
   199  // Subprogram specific flags.
   200  //
   201  // From include/llvm/IR/DebugInfoFlags.def (LLVM 10.0)
   202  const (
   203  	DISPFlagZero           DISPFlag = 0
   204  	DISPFlagVirtual        DISPFlag = 1
   205  	DISPFlagPureVirtual    DISPFlag = 2
   206  	DISPFlagLocalToUnit    DISPFlag = 1 << 2
   207  	DISPFlagDefinition     DISPFlag = 1 << 3
   208  	DISPFlagOptimized      DISPFlag = 1 << 4
   209  	DISPFlagPure           DISPFlag = 1 << 5
   210  	DISPFlagElemental      DISPFlag = 1 << 6
   211  	DISPFlagRecursive      DISPFlag = 1 << 7
   212  	DISPFlagMainSubprogram DISPFlag = 1 << 8
   213  	// LLVM 10.x flags
   214  	DISPFlagDeleted    DISPFlag = 1 << 9
   215  	DISPFlagObjCDirect DISPFlag = 1 << 11
   216  
   217  	// Virtuality and non-virtuality.
   218  	DISPFlagNonvirtual DISPFlag = DISPFlagZero
   219  	DISPFlagVirtuality DISPFlag = DISPFlagVirtual | DISPFlagPureVirtual
   220  
   221  	// Track first and last subprogram specific flag, used by diSPFlagsString in
   222  	// ir/metadata/helper.go.
   223  	DISPFlagFirst = DISPFlagVirtual
   224  	DISPFlagLast  = DISPFlagMainSubprogram
   225  )
   226  
   227  //go:generate stringer -linecomment -type DLLStorageClass
   228  
   229  // DLLStorageClass specifies the DLL storage class of a global identifier.
   230  type DLLStorageClass uint8
   231  
   232  // DLL storage classes.
   233  const (
   234  	DLLStorageClassNone      DLLStorageClass = iota // none
   235  	DLLStorageClassDLLExport                        // dllexport
   236  	DLLStorageClassDLLImport                        // dllimport
   237  )
   238  
   239  //go:generate stringer -linecomment -type DwarfAttEncoding
   240  
   241  // DwarfAttEncoding is a DWARF attribute type encoding.
   242  type DwarfAttEncoding int64
   243  
   244  // DWARF attribute type encodings.
   245  //
   246  // From include/llvm/BinaryFormat/Dwarf.def
   247  const (
   248  	// DWARF v2.
   249  	DwarfAttEncodingAddress      DwarfAttEncoding = 0x01 // DW_ATE_address
   250  	DwarfAttEncodingBoolean      DwarfAttEncoding = 0x02 // DW_ATE_boolean
   251  	DwarfAttEncodingComplexFloat DwarfAttEncoding = 0x03 // DW_ATE_complex_float
   252  	DwarfAttEncodingFloat        DwarfAttEncoding = 0x04 // DW_ATE_float
   253  	DwarfAttEncodingSigned       DwarfAttEncoding = 0x05 // DW_ATE_signed
   254  	DwarfAttEncodingSignedChar   DwarfAttEncoding = 0x06 // DW_ATE_signed_char
   255  	DwarfAttEncodingUnsigned     DwarfAttEncoding = 0x07 // DW_ATE_unsigned
   256  	DwarfAttEncodingUnsignedChar DwarfAttEncoding = 0x08 // DW_ATE_unsigned_char
   257  	// DWARF v3.
   258  	DwarfAttEncodingImaginaryFloat DwarfAttEncoding = 0x09 // DW_ATE_imaginary_float
   259  	DwarfAttEncodingPackedDecimal  DwarfAttEncoding = 0x0A // DW_ATE_packed_decimal
   260  	DwarfAttEncodingNumericString  DwarfAttEncoding = 0x0B // DW_ATE_numeric_string
   261  	DwarfAttEncodingEdited         DwarfAttEncoding = 0x0C // DW_ATE_edited
   262  	DwarfAttEncodingSignedFixed    DwarfAttEncoding = 0x0D // DW_ATE_signed_fixed
   263  	DwarfAttEncodingUnsignedFixed  DwarfAttEncoding = 0x0E // DW_ATE_unsigned_fixed
   264  	DwarfAttEncodingDecimalFloat   DwarfAttEncoding = 0x0F // DW_ATE_decimal_float
   265  	// DWARF v4.
   266  	DwarfAttEncodingUTF DwarfAttEncoding = 0x10 // DW_ATE_UTF
   267  	// DWARF v5.
   268  	DwarfAttEncodingUCS   DwarfAttEncoding = 0x11 // DW_ATE_UCS
   269  	DwarfAttEncodingASCII DwarfAttEncoding = 0x12 // DW_ATE_ASCII
   270  )
   271  
   272  //go:generate stringer -linecomment -type DwarfCC
   273  
   274  // DwarfCC is a DWARF calling convention.
   275  type DwarfCC int64
   276  
   277  // DWARF calling conventions.
   278  const (
   279  	DwarfCCNormal  DwarfCC = 0x01 // DW_CC_normal
   280  	DwarfCCProgram DwarfCC = 0x02 // DW_CC_program
   281  	DwarfCCNoCall  DwarfCC = 0x03 // DW_CC_nocall
   282  	// DWARF v5.
   283  	DwarfCCPassByReference DwarfCC = 0x04 // DW_CC_pass_by_reference
   284  	DwarfCCPassByValue     DwarfCC = 0x05 // DW_CC_pass_by_value
   285  	// Vendor extensions.
   286  	DwarfCCGNUBorlandFastcallI386 DwarfCC = 0x41 // DW_CC_GNU_borland_fastcall_i386
   287  	DwarfCCBORLANDSafecall        DwarfCC = 0xB0 // DW_CC_BORLAND_safecall
   288  	DwarfCCBORLANDStdcall         DwarfCC = 0xB1 // DW_CC_BORLAND_stdcall
   289  	DwarfCCBORLANDPascal          DwarfCC = 0xB2 // DW_CC_BORLAND_pascal
   290  	DwarfCCBORLANDMSFastcall      DwarfCC = 0xB3 // DW_CC_BORLAND_msfastcall
   291  	DwarfCCBORLANDMSReturn        DwarfCC = 0xB4 // DW_CC_BORLAND_msreturn
   292  	DwarfCCBORLANDThiscall        DwarfCC = 0xB5 // DW_CC_BORLAND_thiscall
   293  	DwarfCCBORLANDFastcall        DwarfCC = 0xB6 // DW_CC_BORLAND_fastcall
   294  	DwarfCCLLVMVectorcall         DwarfCC = 0xC0 // DW_CC_LLVM_vectorcall
   295  )
   296  
   297  //go:generate stringer -linecomment -type DwarfLang
   298  
   299  // DwarfLang is a DWARF language.
   300  type DwarfLang int64
   301  
   302  // DWARF languages.
   303  //
   304  // From include/llvm/BinaryFormat/Dwarf.def
   305  const (
   306  	// DWARF v2.
   307  	DwarfLangC89       DwarfLang = 0x0001 // DW_LANG_C89
   308  	DwarfLangC         DwarfLang = 0x0002 // DW_LANG_C
   309  	DwarfLangAda83     DwarfLang = 0x0003 // DW_LANG_Ada83
   310  	DwarfLangCPlusPlus DwarfLang = 0x0004 // DW_LANG_C_plus_plus
   311  	DwarfLangCobol74   DwarfLang = 0x0005 // DW_LANG_Cobol74
   312  	DwarfLangCobol85   DwarfLang = 0x0006 // DW_LANG_Cobol85
   313  	DwarfLangFortran77 DwarfLang = 0x0007 // DW_LANG_Fortran77
   314  	DwarfLangFortran90 DwarfLang = 0x0008 // DW_LANG_Fortran90
   315  	DwarfLangPascal83  DwarfLang = 0x0009 // DW_LANG_Pascal83
   316  	DwarfLangModula2   DwarfLang = 0x000A // DW_LANG_Modula2
   317  	// DWARF v3.
   318  	DwarfLangJava         DwarfLang = 0x000B // DW_LANG_Java
   319  	DwarfLangC99          DwarfLang = 0x000C // DW_LANG_C99
   320  	DwarfLangAda95        DwarfLang = 0x000D // DW_LANG_Ada95
   321  	DwarfLangFortran95    DwarfLang = 0x000E // DW_LANG_Fortran95
   322  	DwarfLangPLI          DwarfLang = 0x000F // DW_LANG_PLI
   323  	DwarfLangObjC         DwarfLang = 0x0010 // DW_LANG_ObjC
   324  	DwarfLangObjCPlusPlus DwarfLang = 0x0011 // DW_LANG_ObjC_plus_plus
   325  	DwarfLangUPC          DwarfLang = 0x0012 // DW_LANG_UPC
   326  	DwarfLangD            DwarfLang = 0x0013 // DW_LANG_D
   327  	// DWARF v4.
   328  	DwarfLangPython DwarfLang = 0x0014 // DW_LANG_Python
   329  	// DWARF v5.
   330  	DwarfLangOpenCL       DwarfLang = 0x0015 // DW_LANG_OpenCL
   331  	DwarfLangGo           DwarfLang = 0x0016 // DW_LANG_Go
   332  	DwarfLangModula3      DwarfLang = 0x0017 // DW_LANG_Modula3
   333  	DwarfLangHaskell      DwarfLang = 0x0018 // DW_LANG_Haskell
   334  	DwarfLangCPlusPlus03  DwarfLang = 0x0019 // DW_LANG_C_plus_plus_03
   335  	DwarfLangCPlusPlus11  DwarfLang = 0x001A // DW_LANG_C_plus_plus_11
   336  	DwarfLangOCaml        DwarfLang = 0x001B // DW_LANG_OCaml
   337  	DwarfLangRust         DwarfLang = 0x001C // DW_LANG_Rust
   338  	DwarfLangC11          DwarfLang = 0x001D // DW_LANG_C11
   339  	DwarfLangSwift        DwarfLang = 0x001E // DW_LANG_Swift
   340  	DwarfLangJulia        DwarfLang = 0x001F // DW_LANG_Julia
   341  	DwarfLangDylan        DwarfLang = 0x0020 // DW_LANG_Dylan
   342  	DwarfLangCPlusPlus14  DwarfLang = 0x0021 // DW_LANG_C_plus_plus_14
   343  	DwarfLangFortran03    DwarfLang = 0x0022 // DW_LANG_Fortran03
   344  	DwarfLangFortran08    DwarfLang = 0x0023 // DW_LANG_Fortran08
   345  	DwarfLangRenderScript DwarfLang = 0x0024 // DW_LANG_RenderScript
   346  	DwarfLangBLISS        DwarfLang = 0x0025 // DW_LANG_BLISS
   347  	// Vendor extensions.
   348  	DwarfLangMipsAssembler      DwarfLang = 0x8001 // DW_LANG_Mips_Assembler
   349  	DwarfLangGoogleRenderScript DwarfLang = 0x8E57 // DW_LANG_GOOGLE_RenderScript
   350  	DwarfLangBorlandDelphi      DwarfLang = 0xB000 // DW_LANG_BORLAND_Delphi
   351  )
   352  
   353  //go:generate stringer -linecomment -type DwarfMacinfo
   354  
   355  // DwarfMacinfo is a macinfo type encoding.
   356  type DwarfMacinfo int64
   357  
   358  // Macinfo type encodings.
   359  //
   360  // From llvm/BinaryFormat/Dwarf.h
   361  const (
   362  	DwarfMacinfoDefine    DwarfMacinfo = 0x01 // DW_MACINFO_define
   363  	DwarfMacinfoUndef     DwarfMacinfo = 0x02 // DW_MACINFO_undef
   364  	DwarfMacinfoStartFile DwarfMacinfo = 0x03 // DW_MACINFO_start_file
   365  	DwarfMacinfoEndFile   DwarfMacinfo = 0x04 // DW_MACINFO_end_file
   366  	DwarfMacinfoVendorExt DwarfMacinfo = 0xFF // DW_MACINFO_vendor_ext
   367  )
   368  
   369  //go:generate stringer -linecomment -type DwarfOp
   370  
   371  // DwarfOp is a DWARF expression operator.
   372  type DwarfOp int64
   373  
   374  // DWARF expression operators.
   375  //
   376  // From include/llvm/BinaryFormat/Dwarf.def (LLVM 13.0)
   377  // From include/llvm/BinaryFormat/Dwarf.h (LLVM 13.0)
   378  const (
   379  	// DWARF v2.
   380  	DwarfOpAddr       DwarfOp = 0x03 // DW_OP_addr
   381  	DwarfOpDeref      DwarfOp = 0x06 // DW_OP_deref
   382  	DwarfOpConst1u    DwarfOp = 0x08 // DW_OP_const1u
   383  	DwarfOpConst1s    DwarfOp = 0x09 // DW_OP_const1s
   384  	DwarfOpConst2u    DwarfOp = 0x0A // DW_OP_const2u
   385  	DwarfOpConst2s    DwarfOp = 0x0B // DW_OP_const2s
   386  	DwarfOpConst4u    DwarfOp = 0x0C // DW_OP_const4u
   387  	DwarfOpConst4s    DwarfOp = 0x0D // DW_OP_const4s
   388  	DwarfOpConst8u    DwarfOp = 0x0E // DW_OP_const8u
   389  	DwarfOpConst8s    DwarfOp = 0x0F // DW_OP_const8s
   390  	DwarfOpConstu     DwarfOp = 0x10 // DW_OP_constu
   391  	DwarfOpConsts     DwarfOp = 0x11 // DW_OP_consts
   392  	DwarfOpDup        DwarfOp = 0x12 // DW_OP_dup
   393  	DwarfOpDrop       DwarfOp = 0x13 // DW_OP_drop
   394  	DwarfOpOver       DwarfOp = 0x14 // DW_OP_over
   395  	DwarfOpPick       DwarfOp = 0x15 // DW_OP_pick
   396  	DwarfOpSwap       DwarfOp = 0x16 // DW_OP_swap
   397  	DwarfOpRot        DwarfOp = 0x17 // DW_OP_rot
   398  	DwarfOpXderef     DwarfOp = 0x18 // DW_OP_xderef
   399  	DwarfOpAbs        DwarfOp = 0x19 // DW_OP_abs
   400  	DwarfOpAnd        DwarfOp = 0x1A // DW_OP_and
   401  	DwarfOpDiv        DwarfOp = 0x1B // DW_OP_div
   402  	DwarfOpMinus      DwarfOp = 0x1C // DW_OP_minus
   403  	DwarfOpMod        DwarfOp = 0x1D // DW_OP_mod
   404  	DwarfOpMul        DwarfOp = 0x1E // DW_OP_mul
   405  	DwarfOpNeg        DwarfOp = 0x1F // DW_OP_neg
   406  	DwarfOpNot        DwarfOp = 0x20 // DW_OP_not
   407  	DwarfOpOr         DwarfOp = 0x21 // DW_OP_or
   408  	DwarfOpPlus       DwarfOp = 0x22 // DW_OP_plus
   409  	DwarfOpPlusUconst DwarfOp = 0x23 // DW_OP_plus_uconst
   410  	DwarfOpShl        DwarfOp = 0x24 // DW_OP_shl
   411  	DwarfOpShr        DwarfOp = 0x25 // DW_OP_shr
   412  	DwarfOpShra       DwarfOp = 0x26 // DW_OP_shra
   413  	DwarfOpXor        DwarfOp = 0x27 // DW_OP_xor
   414  	DwarfOpBra        DwarfOp = 0x28 // DW_OP_bra
   415  	DwarfOpEq         DwarfOp = 0x29 // DW_OP_eq
   416  	DwarfOpGe         DwarfOp = 0x2A // DW_OP_ge
   417  	DwarfOpGt         DwarfOp = 0x2B // DW_OP_gt
   418  	DwarfOpLe         DwarfOp = 0x2C // DW_OP_le
   419  	DwarfOpLt         DwarfOp = 0x2D // DW_OP_lt
   420  	DwarfOpNe         DwarfOp = 0x2E // DW_OP_ne
   421  	DwarfOpSkip       DwarfOp = 0x2F // DW_OP_skip
   422  	DwarfOpLit0       DwarfOp = 0x30 // DW_OP_lit0
   423  	DwarfOpLit1       DwarfOp = 0x31 // DW_OP_lit1
   424  	DwarfOpLit2       DwarfOp = 0x32 // DW_OP_lit2
   425  	DwarfOpLit3       DwarfOp = 0x33 // DW_OP_lit3
   426  	DwarfOpLit4       DwarfOp = 0x34 // DW_OP_lit4
   427  	DwarfOpLit5       DwarfOp = 0x35 // DW_OP_lit5
   428  	DwarfOpLit6       DwarfOp = 0x36 // DW_OP_lit6
   429  	DwarfOpLit7       DwarfOp = 0x37 // DW_OP_lit7
   430  	DwarfOpLit8       DwarfOp = 0x38 // DW_OP_lit8
   431  	DwarfOpLit9       DwarfOp = 0x39 // DW_OP_lit9
   432  	DwarfOpLit10      DwarfOp = 0x3A // DW_OP_lit10
   433  	DwarfOpLit11      DwarfOp = 0x3B // DW_OP_lit11
   434  	DwarfOpLit12      DwarfOp = 0x3C // DW_OP_lit12
   435  	DwarfOpLit13      DwarfOp = 0x3D // DW_OP_lit13
   436  	DwarfOpLit14      DwarfOp = 0x3E // DW_OP_lit14
   437  	DwarfOpLit15      DwarfOp = 0x3F // DW_OP_lit15
   438  	DwarfOpLit16      DwarfOp = 0x40 // DW_OP_lit16
   439  	DwarfOpLit17      DwarfOp = 0x41 // DW_OP_lit17
   440  	DwarfOpLit18      DwarfOp = 0x42 // DW_OP_lit18
   441  	DwarfOpLit19      DwarfOp = 0x43 // DW_OP_lit19
   442  	DwarfOpLit20      DwarfOp = 0x44 // DW_OP_lit20
   443  	DwarfOpLit21      DwarfOp = 0x45 // DW_OP_lit21
   444  	DwarfOpLit22      DwarfOp = 0x46 // DW_OP_lit22
   445  	DwarfOpLit23      DwarfOp = 0x47 // DW_OP_lit23
   446  	DwarfOpLit24      DwarfOp = 0x48 // DW_OP_lit24
   447  	DwarfOpLit25      DwarfOp = 0x49 // DW_OP_lit25
   448  	DwarfOpLit26      DwarfOp = 0x4A // DW_OP_lit26
   449  	DwarfOpLit27      DwarfOp = 0x4B // DW_OP_lit27
   450  	DwarfOpLit28      DwarfOp = 0x4C // DW_OP_lit28
   451  	DwarfOpLit29      DwarfOp = 0x4D // DW_OP_lit29
   452  	DwarfOpLit30      DwarfOp = 0x4E // DW_OP_lit30
   453  	DwarfOpLit31      DwarfOp = 0x4F // DW_OP_lit31
   454  	DwarfOpReg0       DwarfOp = 0x50 // DW_OP_reg0
   455  	DwarfOpReg1       DwarfOp = 0x51 // DW_OP_reg1
   456  	DwarfOpReg2       DwarfOp = 0x52 // DW_OP_reg2
   457  	DwarfOpReg3       DwarfOp = 0x53 // DW_OP_reg3
   458  	DwarfOpReg4       DwarfOp = 0x54 // DW_OP_reg4
   459  	DwarfOpReg5       DwarfOp = 0x55 // DW_OP_reg5
   460  	DwarfOpReg6       DwarfOp = 0x56 // DW_OP_reg6
   461  	DwarfOpReg7       DwarfOp = 0x57 // DW_OP_reg7
   462  	DwarfOpReg8       DwarfOp = 0x58 // DW_OP_reg8
   463  	DwarfOpReg9       DwarfOp = 0x59 // DW_OP_reg9
   464  	DwarfOpReg10      DwarfOp = 0x5A // DW_OP_reg10
   465  	DwarfOpReg11      DwarfOp = 0x5B // DW_OP_reg11
   466  	DwarfOpReg12      DwarfOp = 0x5C // DW_OP_reg12
   467  	DwarfOpReg13      DwarfOp = 0x5D // DW_OP_reg13
   468  	DwarfOpReg14      DwarfOp = 0x5E // DW_OP_reg14
   469  	DwarfOpReg15      DwarfOp = 0x5F // DW_OP_reg15
   470  	DwarfOpReg16      DwarfOp = 0x60 // DW_OP_reg16
   471  	DwarfOpReg17      DwarfOp = 0x61 // DW_OP_reg17
   472  	DwarfOpReg18      DwarfOp = 0x62 // DW_OP_reg18
   473  	DwarfOpReg19      DwarfOp = 0x63 // DW_OP_reg19
   474  	DwarfOpReg20      DwarfOp = 0x64 // DW_OP_reg20
   475  	DwarfOpReg21      DwarfOp = 0x65 // DW_OP_reg21
   476  	DwarfOpReg22      DwarfOp = 0x66 // DW_OP_reg22
   477  	DwarfOpReg23      DwarfOp = 0x67 // DW_OP_reg23
   478  	DwarfOpReg24      DwarfOp = 0x68 // DW_OP_reg24
   479  	DwarfOpReg25      DwarfOp = 0x69 // DW_OP_reg25
   480  	DwarfOpReg26      DwarfOp = 0x6A // DW_OP_reg26
   481  	DwarfOpReg27      DwarfOp = 0x6B // DW_OP_reg27
   482  	DwarfOpReg28      DwarfOp = 0x6C // DW_OP_reg28
   483  	DwarfOpReg29      DwarfOp = 0x6D // DW_OP_reg29
   484  	DwarfOpReg30      DwarfOp = 0x6E // DW_OP_reg30
   485  	DwarfOpReg31      DwarfOp = 0x6F // DW_OP_reg31
   486  	DwarfOpBreg0      DwarfOp = 0x70 // DW_OP_breg0
   487  	DwarfOpBreg1      DwarfOp = 0x71 // DW_OP_breg1
   488  	DwarfOpBreg2      DwarfOp = 0x72 // DW_OP_breg2
   489  	DwarfOpBreg3      DwarfOp = 0x73 // DW_OP_breg3
   490  	DwarfOpBreg4      DwarfOp = 0x74 // DW_OP_breg4
   491  	DwarfOpBreg5      DwarfOp = 0x75 // DW_OP_breg5
   492  	DwarfOpBreg6      DwarfOp = 0x76 // DW_OP_breg6
   493  	DwarfOpBreg7      DwarfOp = 0x77 // DW_OP_breg7
   494  	DwarfOpBreg8      DwarfOp = 0x78 // DW_OP_breg8
   495  	DwarfOpBreg9      DwarfOp = 0x79 // DW_OP_breg9
   496  	DwarfOpBreg10     DwarfOp = 0x7A // DW_OP_breg10
   497  	DwarfOpBreg11     DwarfOp = 0x7B // DW_OP_breg11
   498  	DwarfOpBreg12     DwarfOp = 0x7C // DW_OP_breg12
   499  	DwarfOpBreg13     DwarfOp = 0x7D // DW_OP_breg13
   500  	DwarfOpBreg14     DwarfOp = 0x7E // DW_OP_breg14
   501  	DwarfOpBreg15     DwarfOp = 0x7F // DW_OP_breg15
   502  	DwarfOpBreg16     DwarfOp = 0x80 // DW_OP_breg16
   503  	DwarfOpBreg17     DwarfOp = 0x81 // DW_OP_breg17
   504  	DwarfOpBreg18     DwarfOp = 0x82 // DW_OP_breg18
   505  	DwarfOpBreg19     DwarfOp = 0x83 // DW_OP_breg19
   506  	DwarfOpBreg20     DwarfOp = 0x84 // DW_OP_breg20
   507  	DwarfOpBreg21     DwarfOp = 0x85 // DW_OP_breg21
   508  	DwarfOpBreg22     DwarfOp = 0x86 // DW_OP_breg22
   509  	DwarfOpBreg23     DwarfOp = 0x87 // DW_OP_breg23
   510  	DwarfOpBreg24     DwarfOp = 0x88 // DW_OP_breg24
   511  	DwarfOpBreg25     DwarfOp = 0x89 // DW_OP_breg25
   512  	DwarfOpBreg26     DwarfOp = 0x8A // DW_OP_breg26
   513  	DwarfOpBreg27     DwarfOp = 0x8B // DW_OP_breg27
   514  	DwarfOpBreg28     DwarfOp = 0x8C // DW_OP_breg28
   515  	DwarfOpBreg29     DwarfOp = 0x8D // DW_OP_breg29
   516  	DwarfOpBreg30     DwarfOp = 0x8E // DW_OP_breg30
   517  	DwarfOpBreg31     DwarfOp = 0x8F // DW_OP_breg31
   518  	DwarfOpRegx       DwarfOp = 0x90 // DW_OP_regx
   519  	DwarfOpFbreg      DwarfOp = 0x91 // DW_OP_fbreg
   520  	DwarfOpBregx      DwarfOp = 0x92 // DW_OP_bregx
   521  	DwarfOpPiece      DwarfOp = 0x93 // DW_OP_piece
   522  	DwarfOpDerefSize  DwarfOp = 0x94 // DW_OP_deref_size
   523  	DwarfOpXderefSize DwarfOp = 0x95 // DW_OP_xderef_size
   524  	DwarfOpNop        DwarfOp = 0x96 // DW_OP_nop
   525  	// DWARF v3.
   526  	DwarfOpPushObjectAddress DwarfOp = 0x97 // DW_OP_push_object_address
   527  	DwarfOpCall2             DwarfOp = 0x98 // DW_OP_call2
   528  	DwarfOpCall4             DwarfOp = 0x99 // DW_OP_call4
   529  	DwarfOpCallRef           DwarfOp = 0x9A // DW_OP_call_ref
   530  	DwarfOpFormTLSAddress    DwarfOp = 0x9B // DW_OP_form_tls_address
   531  	DwarfOpCallFrameCFA      DwarfOp = 0x9C // DW_OP_call_frame_cfa
   532  	DwarfOpBitPiece          DwarfOp = 0x9D // DW_OP_bit_piece
   533  	// DWARF v4.
   534  	DwarfOpImplicitValue DwarfOp = 0x9E // DW_OP_implicit_value
   535  	DwarfOpStackValue    DwarfOp = 0x9F // DW_OP_stack_value
   536  	// DWARF v5.
   537  	DwarfOpImplicitPointer DwarfOp = 0xA0 // DW_OP_implicit_pointer
   538  	DwarfOpAddrx           DwarfOp = 0xA1 // DW_OP_addrx
   539  	DwarfOpConstx          DwarfOp = 0xA2 // DW_OP_constx
   540  	DwarfOpEntryValue      DwarfOp = 0xA3 // DW_OP_entry_value
   541  	DwarfOpConstType       DwarfOp = 0xA4 // DW_OP_const_type
   542  	DwarfOpRegvalType      DwarfOp = 0xA5 // DW_OP_regval_type
   543  	DwarfOpDerefType       DwarfOp = 0xA6 // DW_OP_deref_type
   544  	DwarfOpXderefType      DwarfOp = 0xA7 // DW_OP_xderef_type
   545  	DwarfOpConvert         DwarfOp = 0xA8 // DW_OP_convert
   546  	DwarfOpReinterpret     DwarfOp = 0xA9 // DW_OP_reinterpret
   547  	// Vendor extensions.
   548  	DwarfOpGNUPushTLSAddress DwarfOp = 0xE0 // DW_OP_GNU_push_tls_address
   549  	DwarfOpHPIsValue         DwarfOp = 0xE1 // DW_OP_HP_is_value
   550  	DwarfOpHPFltConst4       DwarfOp = 0xE2 // DW_OP_HP_fltconst4
   551  	DwarfOpHPFltConst8       DwarfOp = 0xE3 // DW_OP_HP_fltconst8
   552  	DwarfOpHPModRange        DwarfOp = 0xE4 // DW_OP_HP_mod_range
   553  	DwarfOpHPUnmodRange      DwarfOp = 0xE5 // DW_OP_HP_unmod_range
   554  	DwarfOpHPTLS             DwarfOp = 0xE6 // DW_OP_HP_tls
   555  	DwarfOpIntelBitPiece     DwarfOp = 0xE8 // DW_OP_INTEL_bit_piece
   556  	// Extensions for WebAssembly.
   557  	DwarfOpWASMLocation    DwarfOp = 0xED // DW_OP_WASM_location
   558  	DwarfOpWASMLocationInt DwarfOp = 0xEE // DW_OP_WASM_location_int
   559  	// Historic and not implemented in LLVM.
   560  	DwarfOpAppleUninit DwarfOp = 0xF0 // DW_OP_APPLE_uninit
   561  	// The GNU entry value extension.
   562  	DwarfOpGNUEntryValue   DwarfOp = 0xF3 // DW_OP_GNU_entry_value
   563  	DwarfOpPGIOmpThreadNum DwarfOp = 0xF8 // DW_OP_PGI_omp_thread_num
   564  	// Extensions for Fission proposal.
   565  	DwarfOpGNUAddrIndex  DwarfOp = 0xFB // DW_OP_GNU_addr_index
   566  	DwarfOpGNUConstIndex DwarfOp = 0xFC // DW_OP_GNU_const_index
   567  	// Only used in LLVM metadata.
   568  	DwarfOpLLVMFragment        DwarfOp = 0x1000 // DW_OP_LLVM_fragment
   569  	DwarfOpLLVMConvert         DwarfOp = 0x1001 // DW_OP_LLVM_convert
   570  	DwarfOpLLVMTagOffset       DwarfOp = 0x1002 // DW_OP_LLVM_tag_offset
   571  	DwarfOpLLVMEntryValue      DwarfOp = 0x1003 // DW_OP_LLVM_entry_value
   572  	DwarfOpLLVMImplicitPointer DwarfOp = 0x1004 // DW_OP_LLVM_implicit_pointer
   573  	DwarfOpLLVMArg             DwarfOp = 0x1005 // DW_OP_LLVM_arg
   574  )
   575  
   576  //go:generate stringer -linecomment -type DwarfTag
   577  
   578  // DwarfTag is a DWARF tag.
   579  type DwarfTag int64
   580  
   581  // DWARF tags.
   582  //
   583  // From include/llvm/BinaryFormat/Dwarf.def
   584  const (
   585  	// DWARF v2.
   586  	DwarfTagNull                   DwarfTag = 0x0000 // DW_TAG_null
   587  	DwarfTagArrayType              DwarfTag = 0x0001 // DW_TAG_array_type
   588  	DwarfTagClassType              DwarfTag = 0x0002 // DW_TAG_class_type
   589  	DwarfTagEntryPoint             DwarfTag = 0x0003 // DW_TAG_entry_point
   590  	DwarfTagEnumerationType        DwarfTag = 0x0004 // DW_TAG_enumeration_type
   591  	DwarfTagFormalParameter        DwarfTag = 0x0005 // DW_TAG_formal_parameter
   592  	DwarfTagImportedDeclaration    DwarfTag = 0x0008 // DW_TAG_imported_declaration
   593  	DwarfTagLabel                  DwarfTag = 0x000A // DW_TAG_label
   594  	DwarfTagLexicalBlock           DwarfTag = 0x000B // DW_TAG_lexical_block
   595  	DwarfTagMember                 DwarfTag = 0x000D // DW_TAG_member
   596  	DwarfTagPointerType            DwarfTag = 0x000F // DW_TAG_pointer_type
   597  	DwarfTagReferenceType          DwarfTag = 0x0010 // DW_TAG_reference_type
   598  	DwarfTagCompileUnit            DwarfTag = 0x0011 // DW_TAG_compile_unit
   599  	DwarfTagStringType             DwarfTag = 0x0012 // DW_TAG_string_type
   600  	DwarfTagStructureType          DwarfTag = 0x0013 // DW_TAG_structure_type
   601  	DwarfTagSubroutineType         DwarfTag = 0x0015 // DW_TAG_subroutine_type
   602  	DwarfTagTypedef                DwarfTag = 0x0016 // DW_TAG_typedef
   603  	DwarfTagUnionType              DwarfTag = 0x0017 // DW_TAG_union_type
   604  	DwarfTagUnspecifiedParameters  DwarfTag = 0x0018 // DW_TAG_unspecified_parameters
   605  	DwarfTagVariant                DwarfTag = 0x0019 // DW_TAG_variant
   606  	DwarfTagCommonBlock            DwarfTag = 0x001A // DW_TAG_common_block
   607  	DwarfTagCommonInclusion        DwarfTag = 0x001B // DW_TAG_common_inclusion
   608  	DwarfTagInheritance            DwarfTag = 0x001C // DW_TAG_inheritance
   609  	DwarfTagInlinedSubroutine      DwarfTag = 0x001D // DW_TAG_inlined_subroutine
   610  	DwarfTagModule                 DwarfTag = 0x001E // DW_TAG_module
   611  	DwarfTagPtrToMemberType        DwarfTag = 0x001F // DW_TAG_ptr_to_member_type
   612  	DwarfTagSetType                DwarfTag = 0x0020 // DW_TAG_set_type
   613  	DwarfTagSubrangeType           DwarfTag = 0x0021 // DW_TAG_subrange_type
   614  	DwarfTagWithStmt               DwarfTag = 0x0022 // DW_TAG_with_stmt
   615  	DwarfTagAccessDeclaration      DwarfTag = 0x0023 // DW_TAG_access_declaration
   616  	DwarfTagBaseType               DwarfTag = 0x0024 // DW_TAG_base_type
   617  	DwarfTagCatchBlock             DwarfTag = 0x0025 // DW_TAG_catch_block
   618  	DwarfTagConstType              DwarfTag = 0x0026 // DW_TAG_const_type
   619  	DwarfTagConstant               DwarfTag = 0x0027 // DW_TAG_constant
   620  	DwarfTagEnumerator             DwarfTag = 0x0028 // DW_TAG_enumerator
   621  	DwarfTagFileType               DwarfTag = 0x0029 // DW_TAG_file_type
   622  	DwarfTagFriend                 DwarfTag = 0x002A // DW_TAG_friend
   623  	DwarfTagNamelist               DwarfTag = 0x002B // DW_TAG_namelist
   624  	DwarfTagNamelistItem           DwarfTag = 0x002C // DW_TAG_namelist_item
   625  	DwarfTagPackedType             DwarfTag = 0x002D // DW_TAG_packed_type
   626  	DwarfTagSubprogram             DwarfTag = 0x002E // DW_TAG_subprogram
   627  	DwarfTagTemplateTypeParameter  DwarfTag = 0x002F // DW_TAG_template_type_parameter
   628  	DwarfTagTemplateValueParameter DwarfTag = 0x0030 // DW_TAG_template_value_parameter
   629  	DwarfTagThrownType             DwarfTag = 0x0031 // DW_TAG_thrown_type
   630  	DwarfTagTryBlock               DwarfTag = 0x0032 // DW_TAG_try_block
   631  	DwarfTagVariantPart            DwarfTag = 0x0033 // DW_TAG_variant_part
   632  	DwarfTagVariable               DwarfTag = 0x0034 // DW_TAG_variable
   633  	DwarfTagVolatileType           DwarfTag = 0x0035 // DW_TAG_volatile_type
   634  	// DWARF v3.
   635  	DwarfTagDwarfProcedure  DwarfTag = 0x0036 // DW_TAG_dwarf_procedure
   636  	DwarfTagRestrictType    DwarfTag = 0x0037 // DW_TAG_restrict_type
   637  	DwarfTagInterfaceType   DwarfTag = 0x0038 // DW_TAG_interface_type
   638  	DwarfTagNamespace       DwarfTag = 0x0039 // DW_TAG_namespace
   639  	DwarfTagImportedModule  DwarfTag = 0x003A // DW_TAG_imported_module
   640  	DwarfTagUnspecifiedType DwarfTag = 0x003B // DW_TAG_unspecified_type
   641  	DwarfTagPartialUnit     DwarfTag = 0x003C // DW_TAG_partial_unit
   642  	DwarfTagImportedUnit    DwarfTag = 0x003D // DW_TAG_imported_unit
   643  	DwarfTagCondition       DwarfTag = 0x003F // DW_TAG_condition
   644  	DwarfTagSharedType      DwarfTag = 0x0040 // DW_TAG_shared_type
   645  	// DWARF v4.
   646  	DwarfTagTypeUnit            DwarfTag = 0x0041 // DW_TAG_type_unit
   647  	DwarfTagRvalueReferenceType DwarfTag = 0x0042 // DW_TAG_rvalue_reference_type
   648  	DwarfTagTemplateAlias       DwarfTag = 0x0043 // DW_TAG_template_alias
   649  	// DWARF v5.
   650  	DwarfTagCoarrayType       DwarfTag = 0x0044 // DW_TAG_coarray_type
   651  	DwarfTagGenericSubrange   DwarfTag = 0x0045 // DW_TAG_generic_subrange
   652  	DwarfTagDynamicType       DwarfTag = 0x0046 // DW_TAG_dynamic_type
   653  	DwarfTagAtomicType        DwarfTag = 0x0047 // DW_TAG_atomic_type
   654  	DwarfTagCallSite          DwarfTag = 0x0048 // DW_TAG_call_site
   655  	DwarfTagCallSiteParameter DwarfTag = 0x0049 // DW_TAG_call_site_parameter
   656  	DwarfTagSkeletonUnit      DwarfTag = 0x004A // DW_TAG_skeleton_unit
   657  	DwarfTagImmutableType     DwarfTag = 0x004B // DW_TAG_immutable_type
   658  	// Vendor extensions.
   659  	DwarfTagMIPSLoop                  DwarfTag = 0x4081 // DW_TAG_MIPS_loop
   660  	DwarfTagFormatLabel               DwarfTag = 0x4101 // DW_TAG_format_label
   661  	DwarfTagFunctionTemplate          DwarfTag = 0x4102 // DW_TAG_function_template
   662  	DwarfTagClassTemplate             DwarfTag = 0x4103 // DW_TAG_class_template
   663  	DwarfTagGNUTemplateTemplateParam  DwarfTag = 0x4106 // DW_TAG_GNU_template_template_param
   664  	DwarfTagGNUTemplateParameterPack  DwarfTag = 0x4107 // DW_TAG_GNU_template_parameter_pack
   665  	DwarfTagGNUFormalParameterPack    DwarfTag = 0x4108 // DW_TAG_GNU_formal_parameter_pack
   666  	DwarfTagGNUCallSite               DwarfTag = 0x4109 // DW_TAG_GNU_call_site
   667  	DwarfTagGNUCallSiteParameter      DwarfTag = 0x410A // DW_TAG_GNU_call_site_parameter
   668  	DwarfTagAPPLEProperty             DwarfTag = 0x4200 // DW_TAG_APPLE_property
   669  	DwarfTagBORLANDProperty           DwarfTag = 0xB000 // DW_TAG_BORLAND_property
   670  	DwarfTagBORLANDDelphiString       DwarfTag = 0xB001 // DW_TAG_BORLAND_Delphi_string
   671  	DwarfTagBORLANDDelphiDynamicArray DwarfTag = 0xB002 // DW_TAG_BORLAND_Delphi_dynamic_array
   672  	DwarfTagBORLANDDelphiSet          DwarfTag = 0xB003 // DW_TAG_BORLAND_Delphi_set
   673  	DwarfTagBORLANDDelphiVariant      DwarfTag = 0xB004 // DW_TAG_BORLAND_Delphi_variant
   674  )
   675  
   676  //go:generate stringer -linecomment -type DwarfVirtuality
   677  
   678  // DwarfVirtuality is a DWARF virtuality code.
   679  type DwarfVirtuality int64
   680  
   681  // DWARF virtuality codes.
   682  const (
   683  	DwarfVirtualityNone        DwarfVirtuality = 0x00 // DW_VIRTUALITY_none
   684  	DwarfVirtualityVirtual     DwarfVirtuality = 0x01 // DW_VIRTUALITY_virtual
   685  	DwarfVirtualityPureVirtual DwarfVirtuality = 0x02 // DW_VIRTUALITY_pure_virtual
   686  )
   687  
   688  //go:generate stringer -linecomment -type EmissionKind
   689  
   690  // EmissionKind specifies the debug emission kind.
   691  type EmissionKind int64
   692  
   693  // ref: include/llvm/IR/DebugInfoMetadata.h (LLVM 9.0).
   694  
   695  // Debug emission kinds.
   696  const (
   697  	EmissionKindNoDebug             EmissionKind = 0 // NoDebug
   698  	EmissionKindFullDebug           EmissionKind = 1 // FullDebug
   699  	EmissionKindLineTablesOnly      EmissionKind = 2 // LineTablesOnly
   700  	EmissionKindDebugDirectivesOnly EmissionKind = 3 // DebugDirectivesOnly
   701  )
   702  
   703  //go:generate stringer -linecomment -type FastMathFlag
   704  
   705  // FastMathFlag is a fast-math flag.
   706  type FastMathFlag uint8
   707  
   708  // Fast-math flags.
   709  const (
   710  	FastMathFlagAFn      FastMathFlag = iota // afn
   711  	FastMathFlagARcp                         // arcp
   712  	FastMathFlagContract                     // contract
   713  	FastMathFlagFast                         // fast
   714  	FastMathFlagNInf                         // ninf
   715  	FastMathFlagNNaN                         // nnan
   716  	FastMathFlagNSZ                          // nsz
   717  	FastMathFlagReassoc                      // reassoc
   718  )
   719  
   720  //go:generate stringer -linecomment -type FPred
   721  
   722  // FPred is a floating-point comparison predicate.
   723  type FPred uint8
   724  
   725  // Floating-point predicates.
   726  const (
   727  	FPredFalse FPred = iota // false
   728  	FPredOEQ                // oeq
   729  	FPredOGE                // oge
   730  	FPredOGT                // ogt
   731  	FPredOLE                // ole
   732  	FPredOLT                // olt
   733  	FPredONE                // one
   734  	FPredORD                // ord
   735  	FPredTrue               // true
   736  	FPredUEQ                // ueq
   737  	FPredUGE                // uge
   738  	FPredUGT                // ugt
   739  	FPredULE                // ule
   740  	FPredULT                // ult
   741  	FPredUNE                // une
   742  	FPredUNO                // uno
   743  )
   744  
   745  //go:generate stringer -linecomment -type FuncAttr
   746  
   747  // FuncAttr is a function attribute.
   748  type FuncAttr uint8
   749  
   750  // Function attributes.
   751  const (
   752  	FuncAttrAlwaysInline                    FuncAttr = iota // alwaysinline
   753  	FuncAttrArgMemOnly                                      // argmemonly
   754  	FuncAttrBuiltin                                         // builtin
   755  	FuncAttrCold                                            // cold
   756  	FuncAttrConvergent                                      // convergent
   757  	FuncAttrDisableSanitizerInstrumentation                 // disable_sanitizer_instrumentation
   758  	FuncAttrHot                                             // hot
   759  	FuncAttrInaccessibleMemOnly                             // inaccessiblememonly
   760  	FuncAttrInaccessibleMemOrArgMemOnly                     // inaccessiblemem_or_argmemonly
   761  	FuncAttrInlineHint                                      // inlinehint
   762  	FuncAttrJumpTable                                       // jumptable
   763  	FuncAttrMinSize                                         // minsize
   764  	FuncAttrMustProgress                                    // mustprogress
   765  	FuncAttrNaked                                           // naked
   766  	FuncAttrNoBuiltin                                       // nobuiltin
   767  	FuncAttrNoCFCheck                                       // nocf_check
   768  	FuncAttrNoCallback                                      // nocallback
   769  	FuncAttrNoDuplicate                                     // noduplicate
   770  	FuncAttrNoFree                                          // nofree
   771  	FuncAttrNoImplicitFloat                                 // noimplicitfloat
   772  	FuncAttrNoInline                                        // noinline
   773  	FuncAttrNoMerge                                         // nomerge
   774  	FuncAttrNoProfile                                       // noprofile
   775  	FuncAttrNoRecurse                                       // norecurse
   776  	FuncAttrNoRedZone                                       // noredzone
   777  	FuncAttrNoReturn                                        // noreturn
   778  	FuncAttrNoSanitizeCoverage                              // nosanitize_coverage
   779  	FuncAttrNoSync                                          // nosync
   780  	FuncAttrNoUnwind                                        // nounwind
   781  	FuncAttrNonLazyBind                                     // nonlazybind
   782  	FuncAttrNullPointerIsValid                              // null_pointer_is_valid
   783  	FuncAttrOptForFuzzing                                   // optforfuzzing
   784  	FuncAttrOptNone                                         // optnone
   785  	FuncAttrOptSize                                         // optsize
   786  	FuncAttrReadNone                                        // readnone
   787  	FuncAttrReadOnly                                        // readonly
   788  	FuncAttrReturnsTwice                                    // returns_twice
   789  	FuncAttrSSP                                             // ssp
   790  	FuncAttrSSPReq                                          // sspreq
   791  	FuncAttrSSPStrong                                       // sspstrong
   792  	FuncAttrSafeStack                                       // safestack
   793  	FuncAttrSanitizeAddress                                 // sanitize_address
   794  	FuncAttrSanitizeHWAddress                               // sanitize_hwaddress
   795  	FuncAttrSanitizeMemTag                                  // sanitize_memtag
   796  	FuncAttrSanitizeMemory                                  // sanitize_memory
   797  	FuncAttrSanitizeThread                                  // sanitize_thread
   798  	FuncAttrShadowCallStack                                 // shadowcallstack
   799  	FuncAttrSpeculatable                                    // speculatable
   800  	FuncAttrSpeculativeLoadHardening                        // speculative_load_hardening
   801  	FuncAttrStrictFP                                        // strictfp
   802  	FuncAttrUwtable                                         // uwtable
   803  	FuncAttrWillReturn                                      // willreturn
   804  	FuncAttrWriteOnly                                       // writeonly
   805  )
   806  
   807  //go:generate stringer -linecomment -type IPred
   808  
   809  // IPred is an integer comparison predicate.
   810  type IPred uint8
   811  
   812  // Integer predicates.
   813  const (
   814  	IPredEQ  IPred = iota // eq
   815  	IPredNE               // ne
   816  	IPredSGE              // sge
   817  	IPredSGT              // sgt
   818  	IPredSLE              // sle
   819  	IPredSLT              // slt
   820  	IPredUGE              // uge
   821  	IPredUGT              // ugt
   822  	IPredULE              // ule
   823  	IPredULT              // ult
   824  )
   825  
   826  //go:generate stringer -linecomment -type Linkage
   827  
   828  // Linkage specifies the linkage of a global identifier.
   829  type Linkage uint8
   830  
   831  // Linkage kinds.
   832  const (
   833  	LinkageNone                Linkage = iota // none
   834  	LinkageAppending                          // appending
   835  	LinkageAvailableExternally                // available_externally
   836  	LinkageCommon                             // common
   837  	LinkageInternal                           // internal
   838  	LinkageLinkOnce                           // linkonce
   839  	LinkageLinkOnceODR                        // linkonce_odr
   840  	LinkagePrivate                            // private
   841  	LinkageWeak                               // weak
   842  	LinkageWeakODR                            // weak_odr
   843  	// External linkage.
   844  	LinkageExternal   // external
   845  	LinkageExternWeak // extern_weak
   846  )
   847  
   848  //go:generate stringer -linecomment -type NameTableKind
   849  
   850  // NameTableKind is a name table specifier.
   851  type NameTableKind uint8
   852  
   853  // Name table kinds.
   854  //
   855  // From include/llvm/IR/DebugInfoMetadata.h
   856  const (
   857  	NameTableKindDefault NameTableKind = 0 // Default
   858  	NameTableKindGNU     NameTableKind = 1 // GNU
   859  	NameTableKindNone    NameTableKind = 2 // None
   860  )
   861  
   862  //go:generate stringer -linecomment -type OverflowFlag
   863  
   864  // OverflowFlag is an integer overflow flag.
   865  type OverflowFlag uint8
   866  
   867  // Overflow flags.
   868  const (
   869  	OverflowFlagNSW OverflowFlag = iota // nsw
   870  	OverflowFlagNUW                     // nuw
   871  )
   872  
   873  //go:generate stringer -linecomment -type ParamAttr
   874  
   875  // ParamAttr is a parameter attribute.
   876  type ParamAttr uint8
   877  
   878  // Parameter attributes.
   879  const (
   880  	ParamAttrImmArg     ParamAttr = iota // immarg
   881  	ParamAttrInReg                       // inreg
   882  	ParamAttrNest                        // nest
   883  	ParamAttrNoAlias                     // noalias
   884  	ParamAttrNoCapture                   // nocapture
   885  	ParamAttrNoFree                      // nofree
   886  	ParamAttrNonNull                     // nonnull
   887  	ParamAttrNoUndef                     // noundef
   888  	ParamAttrReadNone                    // readnone
   889  	ParamAttrReadOnly                    // readonly
   890  	ParamAttrReturned                    // returned
   891  	ParamAttrSignExt                     // signext
   892  	ParamAttrSwiftAsync                  // swiftasync
   893  	ParamAttrSwiftError                  // swifterror
   894  	ParamAttrSwiftSelf                   // swiftself
   895  	ParamAttrWriteOnly                   // writeonly
   896  	ParamAttrZeroExt                     // zeroext
   897  )
   898  
   899  //go:generate stringer -linecomment -type Preemption
   900  
   901  // Preemption specifies the preemtion of a global identifier.
   902  type Preemption uint8
   903  
   904  // Preemption kinds.
   905  const (
   906  	PreemptionNone               Preemption = iota // none
   907  	PreemptionDSOLocal                             // dso_local
   908  	PreemptionDSOLocalEquivalent                   // dso_local_equivalent
   909  	PreemptionDSOPreemptable                       // dso_preemptable
   910  )
   911  
   912  //go:generate stringer -linecomment -type ReturnAttr
   913  
   914  // ReturnAttr is a return argument attribute.
   915  type ReturnAttr uint8
   916  
   917  // Return argument attributes.
   918  const (
   919  	ReturnAttrInReg   ReturnAttr = iota // inreg
   920  	ReturnAttrNoAlias                   // noalias
   921  	ReturnAttrNonNull                   // nonnull
   922  	ReturnAttrNoUndef                   // noundef
   923  	ReturnAttrSignExt                   // signext
   924  	ReturnAttrZeroExt                   // zeroext
   925  )
   926  
   927  //go:generate stringer -linecomment -type SelectionKind
   928  
   929  // SelectionKind is a Comdat selection kind.
   930  type SelectionKind uint8
   931  
   932  // Comdat selection kinds.
   933  const (
   934  	SelectionKindAny           SelectionKind = iota // any
   935  	SelectionKindExactMatch                         // exactmatch
   936  	SelectionKindLargest                            // largest
   937  	SelectionKindNoDeduplicate                      // nodeduplicate
   938  	SelectionKindSameSize                           // samesize
   939  )
   940  
   941  //go:generate stringer -linecomment -type Tail
   942  
   943  // Tail is a tail call attribute.
   944  type Tail uint8
   945  
   946  // Tail call attributes.
   947  const (
   948  	TailNone     Tail = iota // none
   949  	TailMustTail             // musttail
   950  	TailNoTail               // notail
   951  	TailTail                 // tail
   952  )
   953  
   954  //go:generate stringer -linecomment -type TLSModel
   955  
   956  // TLSModel is a thread local storage model.
   957  type TLSModel uint8
   958  
   959  // Thread local storage models.
   960  const (
   961  	TLSModelNone TLSModel = iota // none
   962  	// If no explicit model is given, the "general dynamic" model is used.
   963  	TLSModelGeneric      // generic
   964  	TLSModelInitialExec  // initialexec
   965  	TLSModelLocalDynamic // localdynamic
   966  	TLSModelLocalExec    // localexec
   967  )
   968  
   969  //go:generate stringer -linecomment -type UnnamedAddr
   970  
   971  // UnnamedAddr specifies whether the address is significant.
   972  type UnnamedAddr uint8
   973  
   974  // Unnamed address specifiers.
   975  const (
   976  	UnnamedAddrNone             UnnamedAddr = iota // none
   977  	UnnamedAddrLocalUnnamedAddr                    // local_unnamed_addr
   978  	UnnamedAddrUnnamedAddr                         // unnamed_addr
   979  )
   980  
   981  //go:generate stringer -linecomment -type Visibility
   982  
   983  // Visibility specifies the visibility of a global identifier.
   984  type Visibility uint8
   985  
   986  // Visibility kinds.
   987  const (
   988  	VisibilityNone      Visibility = iota // none
   989  	VisibilityDefault                     // default
   990  	VisibilityHidden                      // hidden
   991  	VisibilityProtected                   // protected
   992  )