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

Method LLString

ir/inst_binary.go:507–519  ·  view source on GitHub ↗

LLString returns the LLVM syntax representation of the instruction. 'sdiv' Exactopt X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?

()

Source from the content-addressed store, hash-verified

505//
506// 'sdiv' Exactopt X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?
507func (inst *InstSDiv) LLString() string {
508 buf := &strings.Builder{}
509 fmt.Fprintf(buf, "%s = ", inst.Ident())
510 buf.WriteString("sdiv")
511 if inst.Exact {
512 buf.WriteString(" exact")
513 }
514 fmt.Fprintf(buf, " %s, %s", inst.X, inst.Y.Ident())
515 for _, md := range inst.Metadata {
516 fmt.Fprintf(buf, ", %s", md)
517 }
518 return buf.String()
519}
520
521// Operands returns a mutable list of operands of the given instruction.
522func (inst *InstSDiv) 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