llgo build/install: a.out generated

This commit is contained in:
xushiwei
2024-04-25 00:14:02 +08:00
parent 81b3add443
commit cbaf9e21b2
3 changed files with 13 additions and 7 deletions

View File

@@ -305,7 +305,8 @@ func NewPackage(prog llssa.Program, pkg *ssa.Package, files []*ast.File) (ret ll
})
pkgTypes := pkg.Pkg
ret = prog.NewPackage(pkgTypes.Name(), pkgTypes.Path())
pkgName, pkgPath := pkgTypes.Name(), pkgTypes.Path()
ret = prog.NewPackage(pkgName, pkgPath)
ctx := &context{
prog: prog,
@@ -316,7 +317,7 @@ func NewPackage(prog llssa.Program, pkg *ssa.Package, files []*ast.File) (ret ll
link: make(map[string]string),
loaded: make(map[*types.Package]none),
}
ctx.initFiles(pkgTypes.Path(), files)
ctx.initFiles(pkgPath, files)
for _, m := range members {
member := m.val
switch member := member.(type) {