constZeroInitializer converts the given LLVM IR zero initializer constant to a corresponding Go expression.
(c *constant.ZeroInitializer)
| 129 | // constZeroInitializer converts the given LLVM IR zero initializer constant to |
| 130 | // a corresponding Go expression. |
| 131 | func (d *decompiler) constZeroInitializer(c *constant.ZeroInitializer) ast.Expr { |
| 132 | // Somewhat of a hack, but works :) |
| 133 | // |
| 134 | // *new(T) |
| 135 | expr := &ast.CallExpr{ |
| 136 | Fun: ast.NewIdent("new"), |
| 137 | Args: []ast.Expr{d.goType(c.Typ)}, |
| 138 | } |
| 139 | return &ast.StarExpr{ |
| 140 | X: expr, |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | // expr converts the given LLVM IR expression to a corresponding Go expression. |
| 145 | func (d *decompiler) expr(expr constant.Expr) ast.Expr { |