LLString returns the LLVM syntax representation of the instruction. 'sub' OverflowFlags=OverflowFlag* X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?
()
| 185 | // |
| 186 | // 'sub' OverflowFlags=OverflowFlag* X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+? |
| 187 | func (inst *InstSub) LLString() string { |
| 188 | buf := &strings.Builder{} |
| 189 | fmt.Fprintf(buf, "%s = ", inst.Ident()) |
| 190 | buf.WriteString("sub") |
| 191 | for _, flag := range inst.OverflowFlags { |
| 192 | fmt.Fprintf(buf, " %s", flag) |
| 193 | } |
| 194 | fmt.Fprintf(buf, " %s, %s", inst.X, inst.Y.Ident()) |
| 195 | for _, md := range inst.Metadata { |
| 196 | fmt.Fprintf(buf, ", %s", md) |
| 197 | } |
| 198 | return buf.String() |
| 199 | } |
| 200 | |
| 201 | // Operands returns a mutable list of operands of the given instruction. |
| 202 | func (inst *InstSub) Operands() []*value.Value { |