Commit 900b8bec authored by Ian Lance Taylor's avatar Ian Lance Taylor

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

R=rsc, borman
CC=golang-dev
https://golang.org/cl/5525043
parent b4be65bc
...@@ -453,6 +453,11 @@ func (p *Package) guessKinds(f *File) []*Name { ...@@ -453,6 +453,11 @@ func (p *Package) guessKinds(f *File) []*Name {
for i, b := range isConst { for i, b := range isConst {
if b { if b {
names[i].Kind = "const" 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 { for _, n := range toSniff {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment