cgo: supports c/go callback funcs

This commit is contained in:
Li Jie
2024-11-26 22:34:19 +08:00
parent 5380ffa471
commit 90763de93c
12 changed files with 162 additions and 84 deletions

View File

@@ -448,7 +448,7 @@ func (p *context) funcName(fn *ssa.Function, ignore bool) (*types.Package, strin
if checkCgo(fname) && !cgoIgnored(fname) {
return nil, fname, llgoInstr
}
if isCgoCfuncOrCmacro(fn) {
if isCgoExternSymbol(fn) {
if _, ok := llgoInstrs[fname]; ok {
return nil, fname, llgoInstr
}