termRet converts the given LLVM IR ret terminator to a corresponding Go statement.
(term *ir.TermRet)
| 29 | // termRet converts the given LLVM IR ret terminator to a corresponding Go |
| 30 | // statement. |
| 31 | func (d *decompiler) termRet(term *ir.TermRet) ast.Stmt { |
| 32 | if term.X == nil { |
| 33 | return &ast.ReturnStmt{} |
| 34 | } |
| 35 | return &ast.ReturnStmt{ |
| 36 | Results: []ast.Expr{d.value(term.X)}, |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | // termBr converts the given LLVM IR br terminator to a corresponding Go |
| 41 | // statement. |