typeDef converts the given LLVM IR type into a corresponding Go type definition.
(t irtypes.Type)
| 285 | // typeDef converts the given LLVM IR type into a corresponding Go type |
| 286 | // definition. |
| 287 | func (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. |