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)
| 22 | // elements. The array type is infered from the type of the elements if t is |
| 23 | // nil. |
| 24 | func 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. |
no test coverage detected
searching dependent graphs…