cgo: support full cgo tags

This commit is contained in:
Li Jie
2024-11-15 12:24:46 +08:00
parent a64f4219e9
commit 9f0b3963cb
7 changed files with 344 additions and 50 deletions

View File

@@ -799,10 +799,6 @@ func (p *context) compileInstr(b llssa.Builder, instr ssa.Instruction) {
}
switch v := instr.(type) {
case *ssa.Store:
// skip cgo global variables
if checkCgo(v.Addr.Name()) {
// return
}
va := v.Addr
if va, ok := va.(*ssa.IndexAddr); ok {
if args, ok := p.isVArgs(va.X); ok { // varargs: this is a varargs store
@@ -1083,10 +1079,6 @@ func processPkg(ctx *context, ret llssa.Package, pkg *ssa.Package) {
case *ssa.Type:
ctx.compileType(ret, member)
case *ssa.Global:
// skip cgo global variables
if checkCgo(member.Name()) {
// continue
}
ctx.compileGlobal(ret, member)
}
}