TestFuncParam

This commit is contained in:
xushiwei
2024-04-18 17:15:06 +08:00
parent 3a8ce26c6f
commit 785d7d693b
3 changed files with 52 additions and 7 deletions

View File

@@ -114,7 +114,7 @@ func (p Package) NewVar(name string, typ types.Type) Global {
func (p Package) NewFunc(name string, sig *types.Signature) Function {
t := p.prog.llvmSignature(sig)
fn := llvm.AddFunction(p.mod, name, t.ll)
return &aFunction{fn, t, p.prog}
return newFunction(fn, t, p.prog)
}
func (p Package) String() string {