TestFuncMultiRet

This commit is contained in:
xushiwei
2024-04-19 00:39:09 +08:00
parent 9f9c3b1ed8
commit 6463e2cc2a
3 changed files with 27 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ func (p Package) NewConst(name string, val constant.Value) NamedConst {
func (p Package) NewVar(name string, typ types.Type) Global {
t := p.prog.llvmType(typ)
gbl := llvm.AddGlobal(p.mod, t.ll, name)
return &aGlobal{gbl, t}
return &aGlobal{Expr{gbl, t}}
}
func (p Package) NewFunc(name string, sig *types.Signature) Function {