return false
}
-func container(s *Symbol) int {
+func emitPcln(s *Symbol) bool {
if s == nil {
- return 0
+ return true
}
if Buildmode == BuildmodePlugin && Headtype == objabi.Hdarwin && onlycsymbol(s) {
- return 1
+ return false
}
// We want to generate func table entries only for the "lowest level" symbols,
// not containers of subsymbols.
if s.Type&SCONTAINER != 0 {
- return 1
+ return false
}
- return 0
+ return true
}
// pclntab initializes the pclntab symbol with
}
for _, s := range ctxt.Textp {
- if container(s) == 0 {
+ if emitPcln(s) {
nfunc++
}
}
var last *Symbol
for _, s := range ctxt.Textp {
last = s
- if container(s) != 0 {
+ if !emitPcln(s) {
continue
}
pcln := s.FuncInfo
}
idx := int32(0)
for i, s := range ctxt.Textp {
- if container(s) != 0 {
+ if !emitPcln(s) {
continue
}
p := s.Value
if i < len(ctxt.Textp) {
e = ctxt.Textp[i]
}
- for container(e) != 0 && i < len(ctxt.Textp) {
+ for !emitPcln(e) && i < len(ctxt.Textp) {
e = ctxt.Textp[i]
i++
}