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

Function NewArray

ir/constant/const_array.go:24–32  ·  view source on GitHub ↗

NewArray returns a new array constant based on the given array type and elements. The array type is infered from the type of the elements if t is nil.

(t *types.ArrayType, elems ...Constant)

Source from the content-addressed store, hash-verified

22// elements. The array type is infered from the type of the elements if t is
23// nil.
24func NewArray(t *types.ArrayType, elems ...Constant) *Array {
25 c := &Array{
26 Elems: elems,
27 Typ: t,
28 }
29 // Compute type.
30 c.Type()
31 return c
32}
33
34// String returns the LLVM syntax representation of the constant as a type-value
35// pair.

Callers 1

irArrayConstMethod · 0.92

Calls 1

TypeMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…