constStruct converts the given LLVM IR struct constant to a corresponding Go expression.
(c *constant.Struct)
| 116 | // constStruct converts the given LLVM IR struct constant to a corresponding Go |
| 117 | // expression. |
| 118 | func (d *decompiler) constStruct(c *constant.Struct) ast.Expr { |
| 119 | var fields []ast.Expr |
| 120 | for _, field := range c.Fields { |
| 121 | fields = append(fields, d.constant(field)) |
| 122 | } |
| 123 | return &ast.CompositeLit{ |
| 124 | Type: d.goType(c.Typ), |
| 125 | Elts: fields, |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | // constZeroInitializer converts the given LLVM IR zero initializer constant to |
| 130 | // a corresponding Go expression. |