llgo/ssa: llvmSignature/castPtr/castInt bugfix; link: runtime

This commit is contained in:
xushiwei
2024-04-29 00:16:00 +08:00
parent 78d7f984d1
commit c30ed1b3c8
6 changed files with 715 additions and 27 deletions

View File

@@ -305,7 +305,7 @@ func (p Package) NewFunc(name string, sig *types.Signature) Function {
if v, ok := p.fns[name]; ok {
return v
}
t := p.prog.llvmSignature(sig)
t := p.prog.llvmSignature(sig, false)
fn := llvm.AddFunction(p.mod, name, t.ll)
ret := newFunction(fn, t, p, p.prog)
p.fns[name] = ret