1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:04:41 -07:00

cgo: if value for constant did not parse, get it from DWARF info

R=rsc, borman
CC=golang-dev
https://golang.org/cl/5525043
This commit is contained in:
Ian Lance Taylor 2012-01-09 11:22:26 -08:00
parent b4be65bc7f
commit 900b8becb3

View File

@ -453,6 +453,11 @@ func (p *Package) guessKinds(f *File) []*Name {
for i, b := range isConst {
if b {
names[i].Kind = "const"
if toSniff[i] != nil && names[i].Const == "" {
j := len(needType)
needType = needType[0 : j+1]
needType[j] = names[i]
}
}
}
for _, n := range toSniff {