term converts the given LLVM IR terminator to a corresponding Go statement.
(term ir.Terminator)
| 10 | |
| 11 | // term converts the given LLVM IR terminator to a corresponding Go statement. |
| 12 | func (d *decompiler) term(term ir.Terminator) ast.Stmt { |
| 13 | switch term := term.(type) { |
| 14 | case *ir.TermRet: |
| 15 | return d.termRet(term) |
| 16 | case *ir.TermBr: |
| 17 | return d.termBr(term) |
| 18 | case *ir.TermCondBr: |
| 19 | return d.termCondBr(term) |
| 20 | case *ir.TermSwitch: |
| 21 | return d.termSwitch(term) |
| 22 | case *ir.TermUnreachable: |
| 23 | return d.termUnreachable(term) |
| 24 | default: |
| 25 | panic(fmt.Sprintf("support for terminator %T not yet implemented", term)) |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | // termRet converts the given LLVM IR ret terminator to a corresponding Go |
| 30 | // statement. |
no test coverage detected