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

Method LLString

ir/inst_binary.go:123–135  ·  view source on GitHub ↗

LLString returns the LLVM syntax representation of the instruction. 'fadd' FastMathFlags=FastMathFlag* X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?

()

Source from the content-addressed store, hash-verified

121//
122// 'fadd' FastMathFlags=FastMathFlag* X=TypeValue ',' Y=Value Metadata=(',' MetadataAttachment)+?
123func (inst *InstFAdd) LLString() string {
124 buf := &strings.Builder{}
125 fmt.Fprintf(buf, "%s = ", inst.Ident())
126 buf.WriteString("fadd")
127 for _, flag := range inst.FastMathFlags {
128 fmt.Fprintf(buf, " %s", flag)
129 }
130 fmt.Fprintf(buf, " %s, %s", inst.X, inst.Y.Ident())
131 for _, md := range inst.Metadata {
132 fmt.Fprintf(buf, ", %s", md)
133 }
134 return buf.String()
135}
136
137// Operands returns a mutable list of operands of the given instruction.
138func (inst *InstFAdd) 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