MCPcopy Create free account
hub / github.com/decomp/decomp / termRet

Method termRet

cmd/ll2go/terminator.go:31–38  ·  view source on GitHub ↗

termRet converts the given LLVM IR ret terminator to a corresponding Go statement.

(term *ir.TermRet)

Source from the content-addressed store, hash-verified

29// termRet converts the given LLVM IR ret terminator to a corresponding Go
30// statement.
31func (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.

Callers 1

termMethod · 0.95

Calls 1

valueMethod · 0.95

Tested by

no test coverage detected