This commit is contained in:
xushiwei
2024-04-17 00:01:42 +08:00
parent 70ec2350eb
commit 2596f1d5b2
4 changed files with 29 additions and 1 deletions

View File

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