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

Method typeDef

cmd/ll2go/main.go:287–296  ·  view source on GitHub ↗

typeDef converts the given LLVM IR type into a corresponding Go type definition.

(t irtypes.Type)

Source from the content-addressed store, hash-verified

285// typeDef converts the given LLVM IR type into a corresponding Go type
286// definition.
287func (d *decompiler) typeDef(t irtypes.Type) *ast.GenDecl {
288 spec := &ast.TypeSpec{
289 Name: d.typeIdent(t.GetName()),
290 Type: d.goTypeDef(t),
291 }
292 return &ast.GenDecl{
293 Tok: token.TYPE,
294 Specs: []ast.Spec{spec},
295 }
296}
297
298// globalDecl converts the given LLVM IR global into a corresponding Go variable
299// declaration.

Callers 1

ll2goFunction · 0.80

Calls 2

typeIdentMethod · 0.95
goTypeDefMethod · 0.95

Tested by

no test coverage detected