constArray converts the given LLVM IR array constant to a corresponding Go expression.
(c *constant.Array)
| 82 | // constArray converts the given LLVM IR array constant to a corresponding Go |
| 83 | // expression. |
| 84 | func (d *decompiler) constArray(c *constant.Array) ast.Expr { |
| 85 | if c.CharArray { |
| 86 | return d.constCharArray(c) |
| 87 | } |
| 88 | var elems []ast.Expr |
| 89 | for _, e := range c.Elems { |
| 90 | elems = append(elems, d.constant(e)) |
| 91 | } |
| 92 | return &ast.CompositeLit{ |
| 93 | Type: d.goType(c.Typ), |
| 94 | Elts: elems, |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // constCharArray converts the given LLVM IR character array constant to a |
| 99 | // corresponding Go expression. |
no test coverage detected