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

     1  // Code generated by "stringer -linecomment -type Linkage"; DO NOT EDIT.
     2  
     3  package enum
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[LinkageNone-0]
    12  	_ = x[LinkageAppending-1]
    13  	_ = x[LinkageAvailableExternally-2]
    14  	_ = x[LinkageCommon-3]
    15  	_ = x[LinkageInternal-4]
    16  	_ = x[LinkageLinkOnce-5]
    17  	_ = x[LinkageLinkOnceODR-6]
    18  	_ = x[LinkagePrivate-7]
    19  	_ = x[LinkageWeak-8]
    20  	_ = x[LinkageWeakODR-9]
    21  	_ = x[LinkageExternal-10]
    22  	_ = x[LinkageExternWeak-11]
    23  }
    24  
    25  const _Linkage_name = "noneappendingavailable_externallycommoninternallinkoncelinkonce_odrprivateweakweak_odrexternalextern_weak"
    26  
    27  var _Linkage_index = [...]uint8{0, 4, 13, 33, 39, 47, 55, 67, 74, 78, 86, 94, 105}
    28  
    29  func (i Linkage) String() string {
    30  	if i >= Linkage(len(_Linkage_index)-1) {
    31  		return "Linkage(" + strconv.FormatInt(int64(i), 10) + ")"
    32  	}
    33  	return _Linkage_name[_Linkage_index[i]:_Linkage_index[i+1]]
    34  }