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

     1  // Code generated by "stringer -linecomment -type UnnamedAddr"; 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[UnnamedAddrNone-0]
    12  	_ = x[UnnamedAddrLocalUnnamedAddr-1]
    13  	_ = x[UnnamedAddrUnnamedAddr-2]
    14  }
    15  
    16  const _UnnamedAddr_name = "nonelocal_unnamed_addrunnamed_addr"
    17  
    18  var _UnnamedAddr_index = [...]uint8{0, 4, 22, 34}
    19  
    20  func (i UnnamedAddr) String() string {
    21  	if i >= UnnamedAddr(len(_UnnamedAddr_index)-1) {
    22  		return "UnnamedAddr(" + strconv.FormatInt(int64(i), 10) + ")"
    23  	}
    24  	return _UnnamedAddr_name[_UnnamedAddr_index[i]:_UnnamedAddr_index[i+1]]
    25  }