MCPcopy Create free account
hub / github.com/llir/llvm / LLString

Method LLString

ir/inst_binary.go:187–199  ·  view source on GitHub ↗

LLString returns the LLVM syntax representation of the instruction. 'sub' OverflowFlags=OverflowFlag* X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?

()

Source from the content-addressed store, hash-verified

185//
186// 'sub' OverflowFlags=OverflowFlag* X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?
187func (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.
202func (inst *InstSub) Operands() []*value.Value {

Callers

nothing calls this directly

Calls 3

FprintfMethod · 0.80
IdentMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected