MCPcopy Create free account
hub / github.com/decomp/decomp / constVector

Method constVector

cmd/ll2go/constant.go:71–80  ·  view source on GitHub ↗

constVector converts the given LLVM IR vector constant to a corresponding Go expression.

(c *constant.Vector)

Source from the content-addressed store, hash-verified

69// constVector converts the given LLVM IR vector constant to a corresponding Go
70// expression.
71func (d *decompiler) constVector(c *constant.Vector) ast.Expr {
72 var elems []ast.Expr
73 for _, e := range c.Elems {
74 elems = append(elems, d.constant(e))
75 }
76 return &ast.CompositeLit{
77 Type: d.goType(c.Typ),
78 Elts: elems,
79 }
80}
81
82// constArray converts the given LLVM IR array constant to a corresponding Go
83// expression.

Callers 1

constantMethod · 0.95

Calls 2

constantMethod · 0.95
goTypeMethod · 0.95

Tested by

no test coverage detected