cl: linkname of varName

This commit is contained in:
xushiwei
2024-05-01 20:56:51 +08:00
parent 8f15fd45f2
commit 8d3cb246c2
4 changed files with 17 additions and 9 deletions

View File

@@ -177,7 +177,7 @@ func (p *context) compileMethods(pkg llssa.Package, typ types.Type) {
// Global variable.
func (p *context) compileGlobal(pkg llssa.Package, gbl *ssa.Global) {
typ := gbl.Type()
name := llssa.FullName(gbl.Pkg.Pkg, gbl.Name())
name := p.varName(gbl.Pkg.Pkg, gbl)
if ignoreName(name) || checkCgo(gbl.Name()) {
return
}